📅  最后修改于: 2022-03-11 14:53:29.175000             🧑  作者: Mango
// JavaScript
document.addEventListener("dragover", function(e){
e = e || window.event;
var dragX = e.pageX, dragY = e.pageY;
console.log("X: "+dragX+" Y: "+dragY);
}, false);
// jQuery
$("body").bind("dragover", function(e){
var dragX = e.pageX, dragY = e.pageY;
console.log("X: "+dragX+" Y: "+dragY);
});