document.onmousemove = function (event) {
var e = event || window.event;
if(e.pageX || e.pageY)
return {x:e.pageX, y:e.pageY};
else
return {
x: e.clientX + document.body.scrollLeft - document.body.clientLeft,
y: e.clientY + document.body.scrollTop - document.body.clientTop
};
}
沒有留言:
張貼留言