开发记录 涛吖吖 2021-12-21 68 阅读1分钟 页面刷新 回到顶部: window.onbeforeunload = () => { document.body.scrollTop = 0; document.documentElement.scrollTop = 0; }; 资料传送门:www.runoob.com/jsref/event…