日期:2014-05-17 浏览次数:21224 次
<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;
}
推荐阅读更多>
-
表格同时插入图片和背景图片时,高度错误
-
怎么在button中加入3张背景图片呢 即左 中 右 各一张
-
CSS样式的一点小疑惑,该怎么处理
-
img 无法显示图片时 如何去掉边框
-
用css回控制让Firefox浏览器总是显示右侧纵向的滚动条
-
IE粘贴图片自动上传效能
-
内网外网超连接的有关问题
-
分享十款最棒的免费HTML5视频播放器
-
css控制div,<div class="a b c">class name里面有空格,请教该如何写
-
css背景自适应文字宽度旋钮
-
HtmlUnit与maven的装配
-
惯用CSS书写技巧和CSS HACK技巧
-
IE和Firefox兼容性有关问题高分
-
兼容IE超出一部分滚动,未超出不显示滚动条
-
关于CSS3的Multiple backgrounds解决方案
-
CSS文档源与块级元素(block)内联元素(inline)那点事
-
用css及jQuery实现的精美拉上菜单导航条
-
HTML5菜鸟路线图
-
CSS @import at守则
-
关于表单有关问题,求解答