Window Object
The scrollBy() method scrolls the content by the specified number of pixels.
Note: For this method to work, the visible property of the window's scrollbar must be set to true!
| Parameter | Description |
|---|---|
| xnum | Required. How many pixels to scroll by, along the x-axis (horizontal) |
| ynum | Required. How many pixels to scroll by, along the y-axis (vertical) |
![]()
The ScrollBy() method is supported in all major browsers.
Scroll the content by 100 pixels:
Window Object
| WEB HOSTING |
|---|
| Best Web Hosting |
| PHP MySQL Hosting |
| Best Hosting Coupons |
| UK Reseller Hosting |
| Cloud Hosting |
| Top Web Hosting |
| $7.95/mo SEO Hosting |
| Premium Website Design |
| WEB BUILDING |
|---|
| XML Editor - Free Trial! |
| FREE Website BUILDER |
| Free Website Templates Free CSS Templates |
| Make Your Own Website |
| W3SCHOOLS EXAMS |
|---|
|
Get Certified in: HTML, CSS, JavaScript, XML, PHP, and ASP |
| W3SCHOOLS BOOKS |
|---|
|
New Books: HTML, CSS JavaScript, and Ajax |
| STATISTICS |
|---|
|
Browser Statistics Browser OS Browser Display |
| SHARE THIS PAGE |
|---|