javascript window scrollX, scrollY

scrollX, scrollYNN 6 IE n/a DOM n/a  

Read-only  

Return the pixel distance the window is scrolled along the horizontal (scrollX) and vertical (scrollY) axes. To determine these values in IE, you must take into account compatibility mode settings in IE 6 (see the DOCTYPE element). In backward compatibility mode and in IE for Macintosh, use the document.body.scrollLeft and document.body.scrollTop properties. In IE 6 standards compatibility mode (where document.compatMode == "CSS1Compat"), use document.body.parentNode.scrollLeft and document.body.parentNode.scrollTop to get the scroll values of the html element.

 
Example
 
var scrolledDown = window.scrollY;
 
Value

Integer.

 
Default

0


  • racevthme
    #1
    2008-11-20
    [Quote]
    Thanx A lot boss.....thanQ very much
  • setsuna118
    #2
    2008-12-11
    [Quote]
    Thanks you ^_^
racevthme
setsuna118

2220,Nickname,Homepage or email,Comments here,Add comment