Event pageY and pageX
<html> <body> <script> function function1(myEvent) { document.getElementById("myX").innerHTML = myEvent.pageX; document.getElementById("myY").innerHTML = myEvent.pageY; } document.onmousemove = function1; </script> <p> <b>Page X Coordinate:</b> <span id="myX">0</span> </p> <p> <b>Page Y Coordinate:</b> <span id="myY">0</span> </p> </body> </html>