日期:2014-05-17 浏览次数:20991 次
<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;
}
推荐阅读更多>
-
兼容ie6,ie7以及firefox的css透明滤镜,文字不承袭其透明属性
-
新建一ASP群,顶者有分.该如何处理
-
表格点击加背景有关问题
-
js画图开发库-mxgraph-[uiconfig-用户界面配备.html]
-
html中对于脚本的使用,该怎么解决
-
JqueryUI CSS Scope:Dialog跟Datepicker
-
安卓系统下有ie兼容浏览器吗
-
今日发现一个HTML5开发网站,求鉴定
-
CSS基础2
-
用JS、CSS统制图片最大宽度
-
如何样在一篇文章中空2个格
-
您必须知道的28个HTML5特征、窍门和技术
-
CSS之float在IE浏览器下换行有关问题
-
ie8 padding-left的距离是红狐的两倍
-
打造網頁職業,請高人指點
-
关于CSS的有关问题
-
pad中iframe的有关问题
-
新的ZK 7.0.0 施用Bootstrap、Less、CSS3
-
为什么两个DIV 之间有缝隙 有代码 帮忙调试一下解决方法
-
哪儿能够找到firefox、opera和chrome的API手册啊