日期:2014-05-17 浏览次数:21216 次
<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模型加强
-
关于表边框线粗细的有关问题,请兄弟们帮小弟我想想办法
-
动态改变按钮背景图片IE8不能正常显示有关问题
-
css背景图片留很多透明能影响网页吗
-
关于xhtml,html的一些差异
-
HTML的另类施用
-
HTML5 兑现拖拽
-
怎么将input设置和td一样大且不改变样式
-
一个布局有关问题,谁给个指点吧~
-
JS取得HTML元素位置
-
网页设计中的默许字体样式详解
-
css新手上路(1)
-
经过XMLHTTP加载HTML文件
-
阅读器可以自动修正URL?
-
怎样为自己论坛制作RSS解决办法
-
怎么使用jquery动态加载js,css文件
-
Web前端开发人员跟设计师必读文章推荐【系列一】
-
求教!解决办法
-
Css Hack原理及步骤汇总
-
给网页文字加上即时提示