HTML | DOM MouseEvent clientX Property
The MouseEvent clientX property is a read-only property which is used to return the horizontal coordinate of the mouse pointer based on the current window when a mouse event was triggered.
Return Value: It returns a number which represents the vertical coordinate of the mouse pointer in pixels.
Below program illustrates the MouseEvent clientX property :
Finding out the horizontal coordinates of the mouse pointer when the mouse button is clicked on an element.
After clicking on the paragraph:
Supported Web Browsers:
- Internet Explorer
- Google Chrome
- Apple Safari