日期:2014-05-17 浏览次数:21066 次
<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;
}
推荐阅读更多>
-
如何用embed添加多个音乐文件
-
css 设立元素背景为透明
-
HTML 五 事件属性
-
中纬度距离计算器html版
-
图片的CSS渐变成效
-
CSS实用教程(二)
-
请教各位你们是如何清除项目中无效的css的
-
等候样式表高手。
-
超级链接图片,当鼠标放上边时会下浮
-
手机Web页面下发送消息如何把内容提交下去
-
ie已经限制此站点显示的特定内容。怎么停止限制
-
html一部分页面刷新-使用iframe
-
关于Html标签的更适宜的选择
-
像百度 新浪的弹窗过IE拦截 如何实现
-
失效的float:left,求高手帮忙啊解决方案
-
HTML报表边框的设置小技巧
-
关于div填充整个浏览器的有关问题
-
dhtmlxTree 施用示例
-
Eclipse HTMLEditor 上载安装
-
shtml学习笔记 [SSI|指令|语法|详细说明|实例|帮助手册|上载]