GeorgeWang地字3号

JQuery、Node.js http://www.pecloud.cn/

导航

jquery 获得鼠标指针 X/Y 值

$(document).ready(function() {

  $().mousemove(function(e) {

    // display the x and y axis values inside the div with the id XY

    $('#XY').html("X Axis : " + e.pageX + " | Y Axis " + e.pageY);

  });

});

<div id="XY"></div>

posted on 2011-02-20 14:03  GeorgeWang  阅读(314)  评论(0编辑  收藏  举报