日期:2014-05-17 浏览次数:21112 次
<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;
}
推荐阅读更多>
-
oracle数据库实例的创建方法,该如何处理
-
HTML教程:有序列表
-
刷新模式对话框时,不用弹出页面
-
HTML彻底剖析:普通概念
-
jsoup,html解析的凶器
-
一个URL,该如何处理
-
yii中引来js和css文件
-
CSS式样方面技巧
-
互动论坛制作解决思路
-
在 CSS 中使用 LESS 实现更多效能
-
利用HTML5的classList API优化对式样名className的操作
-
9款心旷神怡的HTML5/CSS3应用特效
-
请教如何使用onclick触发器
-
用iframe引来的表格内容,为什么会不能显示呢
-
移动设备响应式网站之CSS传媒查询
-
strus中html标签范例
-
网页设计中很主要的概念div+浮动.
-
如何将下载的文件替换网页上的左侧菜单
-
CSS透明技艺概总 Firefox/IE/Safari/Chrome/Opera
-
关于iframe有关问题