日期:2014-05-17 浏览次数:21291 次
<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;
}
推荐阅读更多>
-
颜色有关问题,00FF00和green 不相同
-
Struts2/JSP/HTML 页面自动跳转的步骤
-
TWaver HTML5 + Node.js + express + socket.io + redis(1)
-
:小弟我的css为什么不起作用?(!)
-
CSS布局诊断-
-
如何设置给一个设置div 位置又能伸展
-
【通译】YUI CSS框架使用
-
去除部分input标签,其他的标签能将显示的内容放到类似value这样的属性中么
-
初学HTML/CSS:图片怎么在DIV中的垂直居中,文字与DIV中的间距怎么消除
-
CSS的选择器会通过标签里的内容进行选择么
-
请问一个有关链接<a>标签属性的有关问题!
-
可下传图片的htmlEditor
-
CSS中IE6、7和火狐狸对margin、padding的兼容性解析
-
CSS 过滤器 兼容ie,红狐和谷歌
-
javascript跟css兼容性小结
-
安卓系统上有ie兼容浏览器吗?该如何解决
-
居中有关问题?text-align,文字居中,文字所在盒子居中有何关系
-
[散分]老文重发-纯CSS仿微软经典菜单解决办法
-
浏览器插件跟注册表
-
在Freemarker的模板文件中引用html文件的路径有关问题