Please note, this is a STATIC archive of website developer.mozilla.org from November 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Window.scrollTo()

这篇翻译不完整。请帮忙从英语翻译这篇文章

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, see window.scrollBy, window.scrollByLines, and window.scrollByPages.该函数实际上和window.scroll函数是一样的,参考window.scrollBywindow.scrollByLines, and window.scrollByPages)

Specification(规范)

DOM Level 0 不属于任何标准.

文档标签和贡献者

 此页面的贡献者: hephecqq
 最后编辑者: hephecqq,