Window.scrollintoview () scrolls the specified element into the visible area of the browser window. Five attributes

Let elemnt = document.getelementById ('maodian' + a + b); // Locate the element elemnt.scrollIntoView(true); // console.log(elemnt.offsetTop) to adjust the perspective window.scrollto (0, elemnt.offsetTop-55);