clientXEvent Property
Event Object
Definition and Usage
The clientX event property returns the horizontal coordinate of the mouse pointer relative to the browser page (or client area) when the event is triggered.
The client area refers to the current window.
Syntax
event.clientX
Example
Example
The following example shows the coordinates of the mouse pointer when the event occurs:
var x=event.clientX;
var y=event.clientY;
Try it Yourself »
Event Object Other Extensions