JavaScript Tutorial: These handy functions are most useful when you are trying to keep a dynamic element in view, even if the user scrolls the page. These functions return the number of pixels the page has been scrolled by.