Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

clientX property

Gets the x-coordinate of the mouse pointer, relative to the upper-left corner of the viewport (that is, the application's client area).

Document Object Model (DOM) Level 3 Events Specification, Section 5.2.3Internet Explorer 9

 

Syntax

JavaScript

p = object.clientX

 

Property values

Type: Integer

The x-coordinate.

Standards information

Remarks

Client coordinates do not reflect the scroll offset of the page. To get the mouse pointer's coordinates relative to the upper-left corner of the document, use the pageX and pageY properties.

See also

DragEvent
MouseEvent
MouseWheelEvent
WheelEvent
Reference
offsetX
pageX
screenX
x

 

 

Show:
© 2015 Microsoft