$(document).ready(function(){ $(document).mousemove(function (e) { $("p").text("X:" + e.pageX + " Y:" + e.pageY); }); });//该片段来自于http://www.codesnippet.cn/detail/2107201513178.html
来源: http://www.codesnippet.cn/detail/2107201513178.html