Sets or retrieves the x-coordinate of the mouse pointer's position relative to the client area of the window, excluding window decorations and scroll bars.
Sets or retrieves the y-coordinate of the mouse pointer's position relative to the client area of the window, excluding window decorations and scroll bars.
Sets or retrieves the y-coordinate, in pixels, of the mouse pointer's position relative to a relatively positioned parent element.
Remarks
If the user presses a mouse button, use the button property to determine which button was pressed.
Example
This example uses the onmousemove event to monitor the location of the mouse cursor on the screen. When the mouse cursor moves over the div object, a span object is updated with the clientX and clientY property values. The clientX and clientY properties are exposed by the event object.
This feature requires Microsoft® Internet Explorer 4.0 or later. Click the following icon to install the latest version. Then reload this page to view the sample.