screenX event property
Event Object
Definition and Usage
The screenX event property returns the horizontal coordinate of the mouse pointer relative to the screen when the event occurs.
Syntax
event.screenX
Example
Example
The following example shows the coordinates of the mouse pointer when the event occurs:
Click somewhere in the document. A message box will show the x and y coordinates of the pointer relative to the screen.
Try it »
Event Object