$(document).ready(function() { $(document).mousemove(function(e) { $('#XY').html('X 坐标 : ' + e.pageX + ' | Y 坐标 : ' + e.pageY); });});//该片段来自于http://www.codesnippet.cn/detail/27112012681.html
来源: http://www.codesnippet.cn/detail/27112012681.html