日期:2014-05-17 浏览次数:21108 次
<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;
}
推荐阅读更多>
-
FCKeditor在html中的使用
-
搜狗、IE兼容模式下样式错乱有关问题-100分求高人
-
3个div在一行下的宽度设定有关问题
-
HTML5入门教程:html5新添加的标签集合
-
咨询个IE6的奇怪事情解决思路
-
关于网页大图的加载解决方案
-
Div垂直居中及容器内图片垂直居中的CSS解决办法
-
CSS Span 添加图片不出现有关问题
-
在HTML的text input控件获取焦点时设立背景颜色
-
静态页怎么做301重定向?
-
检察REDO日志相关信息并生成HTML文件的脚本
-
div1 div2 如何把div2定位到div1的右下角
-
HTML言语剖析(四)排版标志
-
哪位高手能帮忙看看怎么屏幕居中?
-
outerHTML指什么?outerText呢?解决方法
-
关于切图后的基础混淆有关问题
-
Chrome最新4.0版本支持GreaseMonkey脚本
-
struts1.2中html:select标签用法小结
-
fckeditor在fck_editorarea.css设置的字体在IE上无效
-
超链接标签a中 onmouseover 跟 onmouseout ,求解释