getElementById传入对应的DOM id 即可 document.getElementById(id).scrollIntoView({ block: 'start', behavior: 'smooth' })