日期:2014-05-17 浏览次数:21243 次
<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播发音乐和视频
-
HtmlParser初始研究
-
float 有关问题
-
关于火狐浏览器中回退到注册页面验证码无法刷新有关问题
-
button代替<a></a>如何做
-
XHTML教程,复杂看法XHTML基础知识
-
CSS格局快速入门
-
html javascript 的编码 跟 解码
-
下传CSS帮助文件
-
设计出来的页面,换个计算机颜色就全部变了
-
啊为什么会这么
-
position:relative的层怎么自适应内部position:absolute层的高度
-
font-size : 100%,该怎么处理
-
惯用CSS缩写语法
-
图片IMG标志的alt属性和title属性
-
扩展extjs的htmleditor实现本地下传
-
HTML教程-位置控制
-
求解决bottom属性在火狐和IE8下面不兼容的有关问题
-
表格定位有关问题
-
DIV+CSS课题:W3C标准