鼠标 X Y 坐标
<script type = "text/javascript" > function mousePosition(ev) { if(ev. pageX || ev. pageY) { return {x: ev.pageX, y: ev.pageY} ; } return { x: ev.clientX + document.body.scrollLeft - document.body.clientLeft, y: ev.clientY + document.body.scrollTop - document.body.clientTop } ; } document.onmousemove = mouseMove; function mouseMove( ev) { ev = ev || window.event; var mousePos = mousePosition( ev) ; document. getElementById('mouseXPosition').value=mousePos. x; document. getElementById('mouseYPosition').value=mousePos. y; } </script> <fieldset> <input id = mouseXPosition> <input id = mouseYPosition> </fieldset>