Run ❯
Get your
own
website
Result Size:
625 x 565
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <body> <h1>The Window Object</h1> <h2>The scrollBy() Method</h2> <p>Click to scroll the document.</p> <button onclick="scrollWin()" style="position:fixed">Scroll 100px vertically!</button> <br><br> <h3>Some line breaks to enable scrolling:</h3> <br> <br> <br> <p>When I find myself in times of trouble</p> <br> <br> <br> <p>Mother Mary comes to me</p> <br> <br> <br> <p>Speaking words of wisdom, let it be</p> <br> <br> <br> <p>And in my hour of darkness she is standing right in front of me</p> <br> <br> <br> <p>Speaking words of wisdom, let it be</p> <br> <br> <br> <p>ROCK AND ROLL</p> <br> <br> <br> <p>SCROLL SCROLL SCROLL</p> <br> <br> <br> <p>ROCK AND ROLL</p> <br> <br> <br> <p>SCROLL SCROLL SCROLL</p> <br> <br> <br> <p>ROCK AND ROLL</p> <br> <br> <br> <p>SCROLL SCROLL SCROLL</p> <br> <br> <br> <p>ROCK AND ROLL</p> <br> <br> <br> <p>SCROLL SCROLL SCROLL</p> <br> <br> <br> <p>ROCK AND ROLL</p> <br> <br> <br> <p>SCROLL SCROLL SCROLL</p> <br> <br> <br> <script> function scrollWin() { window.scrollBy(0, 100); } </script> </body> </html>