javascript window scrollX, scrollY
@March 15, 2008, 1:22 a.m.
scrollX, scrollY | Firefox/Netscape/NN 6 IE n/a Chrome/Safari/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 |
Permanent URL:
http://javascript.gakaa.com/window-scrollx-2-0-scrolly.aspx
Discover a sophisticated style and tasteful designs at Buenos Aires Marriott https://www.imdb.com/list/ls4107045714/
Arnoldoptop
- 10 hours
Discover a sophisticated style and tasteful designs at Buenos Aires Marriott https://www.imdb.com/list/ls4105886081/
Arnoldoptop
- 11 hours
Polaris is an international manufacturer of household appliances https://steg.se/
Franknox
- 16 hours
Powered by Linode.