跳转到内容

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];};

参考文献

[编辑]

进一步阅读

[编辑]