TOC PREV NEXT INDEX

Put your logo here!


window.scrollY


Returns the number of pixels that the document has already been scrolled vertically.

Syntax

ypix = window.scrollY 

Parameters

ypix is the number of pixels.

Example

// make sure and go down to the second page 
if (window.scrollY) { 
   scroll(0,0); 
} 
scrollByPages(1); 

Notes

Use this property to check that the document hasn't already been scrolled some if you are using relative scroll functions such as window.scrollBy(), window.scrollByLines(), or window.scrollByPages()

Specification

DOM Level 0. Not part of specification. 


mozilla.org | mailto:oeschger | bug 93108
TOC PREV NEXT INDEX