How Javascript controls ScrollBar
This article introduces the relevant knowledge of "how Javascript controls ScrollBar". Many people will encounter such a dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Use Javascript to control ScrollBar (scroll bar)
The following is the default automatic scroll to the bottom, need to scroll to the top, just change the document.body.scrollHeight to 0.
Method 1: use scroll method to realize
[xss_clean] (new Array (100). Join ("
"))
Method 3: use scrollTo method to realize