Name

pageXOffset, pageYOffset — NN 4 IE n/a DOM n/a

Synopsis

Read-only

The pixel measure of the amount of the page’s content that has been scrolled upward and/or to the left. For example, if a document has been scrolled so that the topmost 100 pixels of the document (the “page”) are not visible because the window is scrolled, the pageYOffset value for the window is 100. When a document is not scrolled, both values are zero.

Example

var vertScroll = self.pageYOffset

Value

Integer.

Default

0

Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.