function dragover_handler(ev) { console.log("dragOver"); // Prevent default select and drag behavior ev.preventDefault(); }
Àý×ÓÈý£¬Çå³ýÊý¾Ý
function dragend_handler(ev) { console.log("dragEnd"); dt = ev.dataTransfer; if (dt.items) { (var i = 0; i < dt.items.length; i++) { dt.items.remove(i); } } else { // Use DataTransfer interface to remove the drag data ev.dataTransfer.clearData(); } }
¡¡