Mega Code Archive

 
Categories / JavaScript Tutorial / GUI Components
 

System Drag And Drop Example

< html>     <head>         <title>System Drag And Drop Example</title>         <script type="text/javascript">                      function handleMouseMove(oEvent) {                 oEvent.srcElement.dragDrop();             }                          function handleDragDropEvent(oEvent) {                 oEvent.dataTransfer.setData("URL", "http://www.rntsoft.com/");             }                                 </script>     </head>     <body>         <P>Try dragging the red square into another browser window.</p>         <P><div style="background-color: red; height: 100px; width: 100px"                 onmousemove="handleMouseMove(event)"                  ondragstart="handleDragDropEvent(event)">http://www.rntsoft.com</div> </p>     </body> </html>