JavaScript/Working with the mouse

JavaScript Console测试

编辑

测试x,y

window.onmouseover = function(){document.title = [event.x,event.y];};

测试offsetX,offsetY

window.onmouseover = function(){document.title = [event.offsetX,event.offsetY];};

测试clientX,clientY

window.onmouseover = function(){document.title = [event.clientX,event.clientY];};

测试pageX,pageY

window.onmouseover = function(){document.title = [event.pageX,event.pageY];};

参考文献

编辑

进一步阅读

编辑