scrollIntoView works well:
document.getElementById("divFirst").scrollIntoView();
full reference in the MDN docs:
https://developer.mozilla.org/en-US/docs/Web/API/Element.scrollIntoView
More Related Contents:
- Preventing my form to refresh using ajax
- Displaying Javascript variables in HTML
- Javascript does not work
- In JavaScript can I make a “click” event fire programmatically for a file input element?
- jQuery document.createElement equivalent?
- Force browser to download image files on click
- How to fix getImageData() error The canvas has been tainted by cross-origin data?
- How to store arbitrary data for some HTML tags
- How to embed fonts in HTML?
- Check with jquery if div has overflowing elements
- Javascript – Append HTML to container element without innerHTML
- Pure javascript method to wrap content in a div
- Replace HTML page with contents retrieved via AJAX
- getElementsByName() not working? [duplicate]
- Getting mouse location in canvas [duplicate]
- Creating Dynamic button with click event in JavaScript
- HTML5 video not streaming and taking 90 seconds to load
- Why aren’t some technically serializable input properties serializable?
- How to play a notification sound on websites?
- Appending form input value to action url as path
- Call two functions from same onclick [duplicate]
- Manually triggering the iPhone/iPad/iPod keyboard from JavaScript
- Detect browser character support in javascript?
- Add an element to the DOM with JavaScript
- How to play a video in a webview with android?
- How can I make a button redirect my page to another page? [duplicate]
- Change placeholder text
- How does HTML tags work inside script tag?
- Convert JavaScript variable value to csv file
- Chrome Extension get selected text