下面的JS代码通过window.scrollBy函数可以控制页面滚动到100,100的坐标位置
<!DOCTYPE html> <html> <head> <script> function scrollWindow() { window.scrollBy(100,100); } </script> </head> <body> <input type="button" onclick="scrollWindow()" value="Scroll" /> <p>SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL</p> <br> <br> <br> <br> <br> <br> <br> <br> <p>SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL</p> <br> <br> <br> <br> <br> <br> <br> <br> <p>SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL</p> <br> <br> <br> <br> <br> <br> <br> <br> <p>SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL</p> <br> <br> <br> <br> <br> <br> <br> <br> <p>SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL</p> <br> <br> <br> <br> <br> <br> <br> <br> <p>SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL</p> <br> <br> <br> <br> <br> <br> <br> <br> <p>SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL</p> <br> <br> <br> <br> <br> <br> <br> <br> <p>SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL</p> <br> <br> <br> <br> <br> <br> <br> <br> </body> </html>