日期:2014-05-17 浏览次数:21225 次
<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;
}
推荐阅读更多>
-
应用CSS 媒体查询功能满足不同屏幕分辨率要求
-
简单效果如何兼容多浏览器
-
Dreamweaver服务器举动的添加按钮无法使用(急)
-
鼠标经过图片放大JS特效有关问题
-
有两个input标签放到一行,怎么实现左边的Input自适应宽度,右边的固定宽度
-
CSS兑现纵向二级菜单
-
父页面如何自动转换成其他的页面
-
大年初一,给老师们拜年了!该如何处理
-
求一段css代码,该怎么处理
-
HTML5基础,第2一部分:组织页面的输入
-
html回来码
-
怎么写按钮的CSS
-
div的宽度有关问题
-
异常:Cannot find bean under name org.apache.struts.taglib.html.BEAN
-
【网站打造视频教程】-第25讲 css块与内联元素!传智播客
-
为什么这段代码在火狐中跑不起来,但在IE中能跑起来?该怎么解决
-
html文本编辑器中的[size=十][/size],[b][/b]这是什么标签?专业术语是什么
-
HTML表格标志教程(28):单元格的边框色属性BORDERCOLOR
-
xml 中安插html代码
-
层的定位和布局解决思路