scrollBy( )
Scrolls the page by a given number of pixels.
The scrollBy()
function returns a Promise that resolves when the current
page has been scrolled by the given number of pixels,
The x
and y
parameters determine the number of horizontal and vertical
pixels to scroll the current page. Negative numbers scroll up or to the
left and positive numbers scroll down or to the right.
Method Declaration
Copy
Method Parameters
xnumberRequired
The horizontal offset, in pixels, to scroll by.
ynumberRequired
The vertical offset, in pixels, to scroll by.
Was this helpful?
Yes
No