我使用javaScript并且不知道如何处理拖放事件。任何帮助将不胜感激。 thnx提前..
答案 0 :(得分:0)
阅读本文:https://developer.mozilla.org/en-US/docs/Web/Events/drag
/* events fired on the draggable target */
document.addEventListener("drag", function(event) {
}, false);
document.addEventListener("dragstart", function(event) {
}, false);
document.addEventListener("dragend", function(event) {
}, false);
/* events fired on the drop targets */
document.addEventListener("dragover", function(event) {
}, false);
document.addEventListener("dragenter", function(event) {
}, false);
document.addEventListener("dragleave", function(event) {
}, false);
document.addEventListener("drop", function(event) {
}, false);