마우스 좌표 확인 방법
자바스크립트/표준호환 2008. 7. 1. 18:25[javascript 예제]
function doSomething(e) { var posx = 0; // x 좌표값 var posy = 0; // y 좌표값 if (!e) var e = window.event; if (e.pageX || e.pageY) { posx = e.pageX; posy = e.pageY; } else if (e.clientX || e.clientY) { posx = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft; posy = e.clientY + document.body.scrollTop + document.documentElement.scrollTop; } // posx and posy contain the mouse position relative to the document // Do something with this information } //사용법 doSomething(event)