首页 > Windows开发 > 详细

Window.scrollTo()

时间:2015-06-18 21:31:08      阅读:291      评论:0      收藏:0      [点我收藏+]

 

翻译正在进行中。

 

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

Specification(规范)

DOM Level 0 不属于任何标准.

Window.scrollTo()

原文:http://www.cnblogs.com/hephec/p/4586832.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!