The Window.scrollTo() method scrolls to a particular set of coordinates in the document.
The Window.scrollTo() and Window.scroll() methods scroll to a particular set of coordinates in the document.
Syntax
window.scrollTo(x-coord, y-coord)
window.scrollTo(options)
window.scroll(x-coord, y-coord)
window.scroll(options)
Parameters
- x-coordis the pixel along the horizontal axis of the document that you want displayed in the upper left.
- y-coordis the pixel along the vertical axis of the document that you want displayed in the upper left.
- optionsis a- ScrollToOptionsdictionary.
Examples
window.scrollTo(0, 1000);
window.scrollTo(0, -1000);
window.scroll(0, 1000);
window.scroll(0, -1000);
 
     
     
     
     
     
     
     
     
     
     
     
     
     
    