get xy coordinates on html5 drop event
with html5 drag and drop, how do i get the x and y position of where the item was dropped on the drop event? i need to dynamically create and display an image and a popup at that point...not using the canv开发者_StackOverflow社区as
Use the standard clientX and clientY properties:
function onDrop(ev) {
window.alert( ev.clientX + ',' + ev.clientY);
ev.stopPropagation();
return false;
}
精彩评论