Window scrollTo () method
Definition and Usage
scrollTo () method can scroll the contents to the specified coordinates.
grammar
scrollTo(xpos,ypos)
parameter | description |
---|---|
xpos | Required. To x coordinate of the upper left corner in the document window's document display area. |
ypos | Required. To y coordinates of the upper left corner in the document window's document display area. |
Browser Support
All major browsers support scrollTo () method
Examples
Examples
Scrolling content coordinate positions 100, 500:
function scrollWindow () {
window.scrollTo (100,500);
}
window.scrollTo (100,500);
}
try it"
Window object