日期:2014-05-17 浏览次数:21017 次
<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;
}
推荐阅读更多>
-
用 CSS兑现Bubble提示框的两种方法
-
CSS模块化(7) CSS的命名
-
怎样更改链接显示或重定向有关问题
-
web规范学习之a标签
-
帮小弟我寻找一个会熟练使用Freehand的人.上海,待遇从优.[高于你目前待遇]
-
能否控制两个<p>之间的间隔?该如何处理
-
网页字体的设置
-
如何去掉这该死的上划线
-
在文档窗口中排版很整齐,在浏览器中却很乱是什么原因?解决思路
-
关于表单元素在不同浏览器之间的间隔有关问题
-
普普通通HTML表单的防止重复提交
-
html凉知识 最前端
-
DIV 的绝对布局有关问题
-
css报表鼠标滑动
-
html table行合拢
-
只使用一次的css样式是写在html里好还是写在CSS文件里好?该如何解决
-
html 格式解决思路
-
chrome html+css 施用记录
-
HTML教程-总复习_Html基础教程_HtmlCss教程
-
惯用正则表达式大全!(例如:匹配中文、匹配html)