ondragstart event handler (IE) : ondragstart « Drag Drop « JavaScript Tutorial






<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>
        <P>Try dragging the image.</p>
        <P><img src="http://www.java2s.com/style/logo.png"
                alt="www.java2s.com"
                ondragstart="handleDragDropEvent(event)"
                ondrag="handleDragDropEvent(event)"
                ondragend="handleDragDropEvent(event)" /></p>
        <P><textarea rows="10" cols="25" readonly="readonly" id="txt1"></textarea></p>

    </body>
</html>








24.8.ondragstart
24.8.1.ondragstart event handler (IE)