Learn how to scroll into view with JavaScript.
The scrollIntoView()
method scrolls an element into the visible area of the browser window.
Scroll the element with id="content" into the visible area of the browser window:
const element = document.getElementById("content");
element.scrollIntoView();
Try it Yourself »
Learn more about the scrollIntoView() method in our JavaScript Reference.
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!