scrollIntoView

语法:

object.scrollIntoView( )

参数:

bAlignToTop 布尔型:true/false,默认参数不传则为true

true:对象的顶端与当前窗口的顶部对齐

false:对象的底端与当前窗口的顶部对齐

使用示例:

document.getElementById("obj").scrollIntoView();

posted @ 2016-04-08 10:21  迷失地  阅读(192)  评论(0编辑  收藏  举报