Drag Drop JavaScript Tutorial

< html>
    
        System Drag And Drop Example
        
            function handleDragDropEvent(oEvent) {
                switch(oEvent.type) {
                    case "dragover":
                    case "dragenter":
                        oEvent.returnValue = false;
                        break;
                    case "drop":
                        alert(oEvent.dataTransfer.getData("text"));
                }
            }
        
    
    
        

show you the selected text when dropped.


        


                     ondragenter="handleDragDropEvent(event)"
             ondragover="handleDragDropEvent(event)"
             ondrop="handleDragDropEvent(event)">