问题:
How do I scroll to the top of the page using a JavaScript? 如何使用JavaScript滚动到页面顶部? It is desirable even if the scrollbar instantly jumps to the top. 即使滚动条立即跳到顶部也是可取的。 I'm not looking for a smooth scrolling. 我不是在寻找平滑的滚动。
解决方案:
参考一: https://stackoom.com/question/4nob/使用JavaScript滚动到页面顶部吗参考二: https://oldbug.net/q/4nob/Scroll-to-the-top-of-the-page-using-JavaScript
来源:oschina
链接:https://my.oschina.net/u/3797416/blog/4303292