Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

screenX event property

screenX event property

Event Object Reference 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:

Runoob Tutorial(runoob.com)

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 Reference Event Object