日期:2014-05-17 浏览次数:21168 次
<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网页与静态网页的实质区别
-
关于jquery中iframe取值有关问题 高分答题
-
CSS3之背景尺度Background-size
-
v5_03 在CSS资料中定义样式
-
html<a>标签链接有关问题
-
格式化一个xml资料在html中显示
-
font有关问题目
-
css 文件有些大 有没有工具可以列目录
-
请问下怎么做按钮效果
-
你肯定没注意过,SPAN元素的宽度高度在IE上竟然有用!
-
HTML之清单标志
-
struts中welcome page加载css疏失
-
调试页面遇到CSS在IE和FF下的兼容有关问题
-
HTML5安全风险详析之一:CORS强攻
-
特殊页面设计有关问题请问
-
python除开html转移字符
-
CSS滤镜成效介绍
-
对网站运用css sprite 技术自动化实施方式的探讨
-
浏览器兼容 CSS Hack步骤