<!-- 页面内的跳转 --> <a href="#id">跳转</a> <!-- 新页面的跳转 --> <a href="a.html#id">跳转</a>
// id格式#test,.class document.querySelector(id).scrollIntoView(true)