日期:2014-05-17 浏览次数:20922 次
<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;
}
推荐阅读更多>
-
HTML5 speech 语音输入步骤
-
与此同时安装多个版本的ie的方法
-
将HTML自动转向JS代码
-
用css3跟ico图片实现火狐社区的分享图标
-
怎么在网页嵌入 百度图片搜索
-
html超链接a标签的href跳转跟onclick之间执行关系
-
弹出网页窗口设计全攻略
-
ul li 水平排列不断行和垂直居中有关问题,求解答,虚心求教
-
有没有人知道,一种集成浏览器,就是把IE6,IE7,IE8,IE9等集成在一个浏览器中,该如何解决
-
技巧运用无极限 HTML表格运用从入门到知晓
-
DIV+CSS 级联上拉菜单 多级上拉菜单
-
请问一下,搜狐的这个提示如何做
-
晒一下子 最近学习Html5 的成绩
-
解决cgi程序在firefox中输出html代码的有关问题
-
css统制UL LI 的样式
-
CSSdiv格局颜色方面参考
-
HTML表格标志教程(46):表格的表尾标志<TFOOT>
-
如何了解语义化的html结构
-
【CSS】<ul>CSS初始化的有关问题
-
纯css三响应式3d翻转菜单