日期:2014-05-17 浏览次数:21326 次
<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;
}
推荐阅读更多>
-
DHTML【11】-DOM
-
最新界别兼容IE6/IE7/IE8/IE9/FF的CSS HACK写法和Css if hack条件语法操作说明
-
HTML表格标志教程(12):边框样式属性FRAME
-
XHTML MP MIME 部类与文件扩展
-
HTML5 APIs 软件工程师指南
-
如何实现水平方向中间对齐
-
请问个有关问题关于上拉框
-
css使用float属性后的覆盖有关问题
-
XHTML1.0学习小结
-
怎么解决text输入框导致父元素overflow错误
-
html页面表单向servlet提交中文数据乱码有关问题
-
FireFox Flash<embed src="ch.swf" FlashVars="uid=1234" 不支持,该如何解决
-
问一个基础的CSS有关问题…
-
菜单怎么居中显示,请做最小的改动
-
怎样用CSS在table中设立浮动层
-
HTML网页列表标志学习教程
-
img有关问题
-
html a标签中调用js中的步骤的方法
-
腾讯宠儿回家404页面html代码
-
哪位大神告诉小弟我一上,html5的变换矩阵为什么得出上面的结果