Cross-browser, pure JavaScript solution:
document.body.scrollTop = document.documentElement.scrollTop = 0;
More Related Contents:
- Scroll Function working in reverse order [closed]
- How to scroll an HTML page to a given anchor
- Trigger event when user scroll to specific element – with jQuery
- Keep overflow div scrolled to bottom unless user scrolls up
- prevent Scroll bubbling from element to window
- How to do a horizontal scroll on mouse wheel scroll?
- How to load images dynamically (or lazily) when users scrolls them into view
- javascript: detect scroll end
- jQuery jump or scroll to certain position, div or target on the page from button onclick [duplicate]
- Scrolling Overflowed DIVs with JavaScript
- javascript change element from another page
- This doesn’t seem right? Javascript isn’t working
- Pure JavaScript equivalent of jQuery’s $.ready() – how to call a function when the page/DOM is ready for it [duplicate]
- Prevent scrolling of parent element when inner element scroll position reaches top/bottom?
- Refresh/reload the content in Div using jquery/ajax
- How to delete a localStorage item when the browser window/tab is closed?
- event.wheelDelta returns undefined
- jQuery Text to Link Script? [duplicate]
- Dashed border animation in css3 animation
- jQuery – Redirect with post data
- Clearing my form inputs after submission
- Click on option event
- Is there any problem with using HTML5’s “data-*” attributes for older browsers?
- Fade background image in and out with jQuery?
- Trying to load local JSON file to show data in a html page using JQuery
- How to do something before on submit?
- Disable zoom on input focus in Android webpage
- Include html in another html file [duplicate]
- How to get an element by its href in jquery?
- Keep tabbing within modal pane only