1、方法一:(使用scrollTo,有滚动效果) window.scrollTo({ left: 0, top: 0, behavior: ‘smooth’ }) 方法二:(使用scrollTo(),没有有滚动效果) scrollTo(0,0); 方法三:(使用scrollBy(),没有有滚动效果) scrollTo(0,0); 方法四:(使用锚点没有滚动效果) a标签结合name或结合id定位 方法五:(使用scrollIntoView()) scrollIntoView()