$(document).ready(function(){ $(document).mousemove(function(e){ $('#xy').html("X :"+e.pageX+"| Y:"+e.pageY); }); }); <div id="xy"></div>
$(document).ready(function(){ $(document).mousemove(function(e){ $('#xy').html("X :"+e.pageX+"| Y:"+e.pageY); }); }); <div id="xy"></div>
转载于:https://www.cnblogs.com/zlx7/p/5006606.html