December 2013
Intermediate to advanced
384 pages
9h 54m
English
window.pageXOffset; // number of pixels the page has scrolled to the right window.pageYOffset; // returns number of pixels the page has scrolled down
When writing dynamic code, it is often necessary to determine the exact location in the web page that is currently being viewed. When the user scrolls down or to the right, the position of the page to the frame of the browser view port changes.
To determine the number of pixels the page has scrolled to the right, use the window.pageXOffset attribute. To determine the number of pixels the page has scrolled down, use the window.pageYOffset attribute.
Read now
Unlock full access