日期:2014-05-17 浏览次数:21322 次
<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;
}
推荐阅读更多>
-
当用Servlet来处理http请求并产生返回的HTML页面时,怎么使HTML页面中的中文字符能够正常显示
-
HTML5的货色
-
问个网页传输的有关问题
-
HTML5学习资源整理
-
求人给一个很简单的点击换图片代码解决方案
-
相对遮罩层如何做啊求高手
-
css事例
-
怎么让图片填满整个区域?多谢
-
HTML5的开展:微格式和相关的属性称号
-
ol里li前边的数字样式可以改吗
-
关于HTML5 Canvas文章的搜集
-
HTML5表单验证功用:支持老旧阅读器
-
Yii Framework在控制器增添CSS文件或JavaScript文件
-
htmleditor 唤起自定义tld 无法解析
-
HTML中的列表跟框架
-
为何这个没效果
-
要怎么开发网站?太难过了
-
惯用CSS设置
-
<link rel="shortcut icon" href="favicon.ico" />显示不了图标,该怎么解决
-
火狐的title里面加元素不显示