pageX property

Gets the x-coordinate of the mouse pointer, relative to the upper-left corner of the page.

Syntax

JavaScript

p = object.pageX

Property values

Type: Integer

The x-coordinate.

Standards information

Remarks

The pageX property is equivalent to the clientX value plus the scrollLeft value of the document, as the following code example shows.


var pageX = event.clientX + document.documentElement.scrollLeft; 

See also

DragEvent
MouseEvent
MouseWheelEvent
WheelEvent
Reference
clientX
offsetX
screenX
x
pageY
offsetY
screenY
y

 

 

Show:
© 2014 Microsoft