JavaScript Tutorial/Drag Drop/ondrag
ondrag event handler (IE)
<source lang="javascript">
<html>
<head> <title>System Drag And Drop Example</title> <script type="text/javascript"> function handleDragDropEvent(oEvent) { var oTextbox = document.getElementById("txt1"); oTextbox.value += oEvent.type + "\n"; } </script> </head> <body>
Try dragging the image.
<img src="http://www.wbex.ru/style/logo.png" alt="www.wbex.ru" ondragstart="handleDragDropEvent(event)" ondrag="handleDragDropEvent(event)" ondragend="handleDragDropEvent(event)" />
<textarea rows="10" cols="25" readonly="readonly" id="txt1"></textarea>
</body>
</html></source>