首页 > 编程 > JavaScript > 正文

document.documentElement && document.documentElement.scrollTop

2019-11-21 01:51:37
字体:
来源:转载
供稿:网友

在标准的浏览器下,需要注意的东西,例如双击自动滚动

var diffY;
if (document.documentElement && document.documentElement.scrollTop)
    diffY = document.documentElement.scrollTop;
else if (document.body)
    diffY = document.body.scrollTop
else
    {/*Netscape stuff*/}

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表