Javascript Reference
Categories: window

javascript window pageXOffset, pageYOffset

@March 15, 2008, 1:22 a.m.
pageXOffset, pageYOffsetFirefox/Netscape/NN 4 IE n/a Chrome/Safari/DOM n/a  

Read-only  

Specify 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


Powered by Linode.