<html> <head> <script type="text/javascript"> function coordinates(event){ alert("X=" + event.screenX + " Y=" + event.screenY) } </script> </head> <body onmousedown="coordinates(event)"> <p>Click in the document. </p> </body> </html>