This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.
The non-standard, read-only
pageX returns the horizontal coordinate of the event
relative to the whole document.
This property was never part of any standard, and was only implemented across a
subset of browsers, and only for a limited number of versions. A standardized version
pageX was added to the
interface, however, and is well-supported. You should not expect to find
pageX on any non-mouse events. Do not look for
pageX on any
non-mouse events in new code and update existing code as soon as possible.
var pos = event.pageX
An integer value, in pixels, indicating the X coordinate at which the mouse pointer was located when the event occurred. This value is relative to the left edge of the entire document, regardless of the current horizontal scrolling offset of the document.
For an example, see the documentation for the standard
property, which you should use instead.
This property is not part of any specification. See
BCD tables only load in the browser