1.document.body.scrollTop=document.documentElement.scrollTop=0 //頁面滾動到頂部
2.document.body.scrollIntoView()
3.document.getElementById('site-nav').scrollIntoView()
鏈接:https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView
1.document.body.scrollTop=document.documentElement.scrollTop=0 //頁面滾動到頂部
2.document.body.scrollIntoView()
3.document.getElementById('site-nav').scrollIntoView()
鏈接:https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView
(function(d, s, id) { let js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) retur