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

參考文獻

編輯

進一步閱讀

編輯