Javascript Reference
Categories: window

javascript window scrollX, scrollY

@March 15, 2008, 1:22 a.m.
scrollX, scrollYFirefox/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

Hi my friend! I want to say that this post is amazing,
great written and come with almost all significant infos.
I would like to see more posts like this .
Throttle Position Monitoring - 31 hours
<a href=https://allnewstoday365.com/>allnewstoday365.com</a>
JamesSeasp - 38 hours
I don't even know how I ended up here, but I thought this post was good.
I don't know who you are but definitely you're going to
a famous blogger if you are not already
Aladin138 - 41 hours

Powered by Linode.