getElementById傳入對應(yīng)的DOM id 即可 document.getElementById(id).scrollIntoView({ block: 'start', behavior: 'smooth' })