<!DOCTYPE HTML><HTML><HeadLang= "en"> <title></title> <MetaCharSet= "Utf-8"></Head><Body> <ahref= "00_ Show _ Hide toggle. html">Hide Toggle Page</a> <imgsrc=".. /resource/1.jpg "draggable= "true"ID= "IMG1"/><Scripttype= "Text/javascript"> varIMG1=document.getElementById ("IMG1"); Img1.ondragstart= function(evt) {Evt.dataTransfer.setData ("Text/plan","www.baidu.com"); } document.ondragover= function(evt) {//Cancel the default behavior of an event return false; } Document.ondrop= function(evt) {img1.style.position= "Absolute"; Img1.style.left=Evt.pagey+"px"; //Cancel Event default behavior return false; }</Script></Body></HTML><!--1 Set the Draggable property of the element you want to drag to true2 to set the listener for the dragged element -
HTML5 files in the drag-and-drop support or slightly complicated, JS framework should have a better solution
Drag and drop of elements