翻译正在进行中。
Summary(总结)
Scrolls to a particular set of coordinates in the document.(滚动到document的某一个位置点)
Syntax(语法)
window.scrollTo(x-coord,y-coord )
Parameters(参数)
-
x-coord is the pixel along the horizontal axis of the document that you want displayed in the upper left.(x-coord参数是这个document的横轴点位置,将会出现在左上方) y-coord is the pixel along the vertical axis of the document that you want displayed in the upper left.(y-coord参数是这个document的纵轴点位置,将会出现在左上方)
Example(例子)
window.scrollTo( 0, 1000 );
Notes(注意)
This function is effectively the same as window.scroll. For relative scrolling, seewindow.scrollBy, window.scrollByLines, and window.scrollByPages.该函数实际上和window.scroll函数是一样的,参考window.scrollBy, window.scrollByLines, and window.scrollByPages)
Specification(规范)
DOM Level 0 不属于任何标准.
时间: 2024-10-29 05:15:55