JavaScript Tutorial/Drag Drop/ondrag — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Текущая версия на 11:24, 26 мая 2010
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>