日期:2014-05-17 浏览次数:21022 次
<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;
}
推荐阅读更多>
-
为什么小弟我的网页里的图片都是一张占一行?后面的文字都自动换行了
-
网页中插入的swf视频为什么没有按钮 开始 暂停 快进 什么的都没有解决办法
-
右面部分的滚动发货栏上方的空白行怎样去掉,影响美观
-
鼠标点击span内文字改变其底色,该如何处理
-
jquery append()步骤与html()方法用法区别
-
history.back后退至上一页,遮罩层div无法消除的有关问题
-
IE6.0与FF的区别有关问题
-
运用XHTML制造网页时留意的要点总结
-
span里面的东西为什么会掉上来,不跟li在一条直线下
-
Ext设立Ext.form.Label的html
-
html5 css3 效果图归藏
-
HTML障蔽回车提交功能
-
JS 使用iframe标签,点击iframe链接页面的一个旋钮,刷新父级页面
-
改动字体而不影响网页
-
多行溢出 ,文本显示为省略号如何写
-
HTML中js操作 Select的施用详解
-
css3设立滚动条
-
firefox是非主流浏览器吗?解决方案
-
元素水平居中方案总结
-
JqueryUI CSS Scope:Dialog跟Datepicker