MDN’s new design is in Beta! A sneak peek: https://blog.mozilla.org/opendesign/mdns-new-design-beta/

The pageX read-only property of the MouseEvent interface returns the X (horizontal) coordinate in pixels of the event relative to the whole document. This property takes into account any horizontal scrolling of the page. Originally, this property was defined as a long integer. The CSSOM View Module redefined it as a double float. See the Browser compatibility section for details.

Syntax

var pos = event.pageX

Examples

var pageX = event.pageX;

Specifications

Specification Status Comment
CSS Object Model (CSSOM) View Module
The definition of 'pageX' in that specification.
Working Draft Redefined from long to double.
Touch Events
The definition of 'pageX' in that specification.
Unknown Initial definition.

Browser compatibility

Feature Chrome Edge Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support 45.0 (Yes) (Yes) 9 (Yes) (Yes)
Redefined from long to double 56 ? ? ? ? ?
Feature Android Webview Chrome for Android Edge Firefox Mobile (Gecko) Firefox OS IE Mobile Opera Mobile Safari Mobile
Basic support 45.0 45.0 (Yes) ? ? ? ? ?
Redefined from long to double 56 56 ? ? ? ? ? ?

See also

Document Tags and Contributors

 Contributors to this page: jpmedley, libbymc, salty-horse, teoli, cvrebert
 Last updated by: jpmedley,