日期:2014-05-17 浏览次数:21083 次
<script>
var d, str;
window.onload = window.onscroll = function () {
d = document.getElementById("d");
str = "<strong>" + ((document.compatMode.toLowerCase().indexOf("back") >= 0) ? "Quirks" : "Standards") + "</strong><br />"
+ "document.documentElement.scrollTop:" + document.documentElement.scrollTop + "<br />"
+ "document.body.scrollTop:" + document.body.scrollTop;
d.innerHTML = str;
}
</script>
<body style="font:12px Arial; _background-attachment:fixed; _background-image:url(about:blank);">
<div style="height:10000px;"></div>
<div id="d" style="position:fixed; top:0; left:0; _position:absolute; _top:expression(offsetParent.scrollTop); _left:expression(offsetParent.scrollLeft); background:#ddd;"></div>
</body>
var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
int HTMLBodyElement::scrollTop() const
{
// Update the document's layout.
Document* doc = document();
doc->updateLayoutIgnorePendingStylesheets();
FrameView* view = doc->view();
return view ? adjustForZoom(view->scrollY(), view) : 0;
}
int HTMLBodyElement::scrollLeft() const
{
// Update the document's layout.
Document* doc = document();
doc->updateLayoutIgnorePendingStylesheets();
FrameView* view = doc->view();
return view ? adjustForZoom(view->scrollX(), view) : 0;
}
推荐阅读更多>
-
用好HTML表单的选择框
-
分享一个CSS3的格子系统架构 - ResponsiveAeon
-
html文件中文在浏览器中显示乱码有关问题解决
-
CSS鼠标属性
-
新手求教!该如何处理
-
css上拉菜单
-
js 实现HTML文本框实现上拉提示
-
网页设计分寸标准
-
[]求上面的代码有关问题出在哪里
-
请教DIV能否遮蔽OBJECT
-
可下传图片的htmlEditor
-
关于改变分辨率,布局乱了的有关问题
-
利用HTML5打造音乐播放器【一】
-
[Html]Jquery兑现星级评分效果
-
css 图片 局部 明晰(圆形 需要支持css3)
-
list里套list的有关问题
-
HTTP缓存的有关问题!请大家帮忙!
-
八款精致的纯CSS3按钮特效
-
css札记1
-
用html5做的俄罗斯方块,该怎么处理