日期:2014-05-17 浏览次数:20946 次
<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;
}
推荐阅读更多>
-
div滚动条的有关问题
-
XHTML 1.0
-
IE和火狐的css兼容性有关问题
-
java正则表达式查寻html标签和去除html代码
-
百度mapApi进阶教程-弹出信息窗口5.html
-
HTML教程:脚本JS标志script详解
-
html 字符实业
-
为什么不能以偏移父节点解决办法
-
用html良好实现的功能,却在extjs中,如此蛋疼。
-
java将html实业字符转换成正常字符
-
网页画布大小正常设为多大合适
-
(X)HTML Strict 下的嵌套规则
-
关于JSP网页开发中tomcat、myeclipse完全配备
-
HTML5中更迭变换表格的行颜色
-
js正则实现从一段复杂html代码字符串中婚配并处理特定信息
-
关于CSS的几个小问题
-
java扫除html格式
-
css统制溢出文字替换为点符号显示
-
CSS规则解析,该怎么解决
-
HTML5 与 XHTML2