日期:2014-05-17 浏览次数:20966 次
<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;
}
推荐阅读更多>
-
DIV样式有关问题,进来看看
-
div+css3栏自适应宽度布局实例
-
div:hover在ie6中不兼容有关问题如何解决
-
利用css 跟 js 实现遮罩层
-
请教有没一种固定版本的浏览器
-
侦测Flash被按的次数?解决办法
-
大伙谈谈找工作都比较看重什么呀?
-
9个技巧网页快速减肥_HTML基础_前端技术
-
小议应用“完整”的CSS的缺点
-
求思路:本地模版网页使用ajax加载数据库内容解决方案
-
制造网页时慎重运用mailto标签
-
Dreamweaver服务器举动的添加按钮无法使用(急)
-
动态连接网页的有关问题 急
-
XML 与 HTML 的重要区别
-
請問有沒有一個軟體.是可以用遠端分享給多個朋友看的,该如何解决
-
html横向自动分段,该怎么解决
-
WAP 手机终端 CSS 式样实战
-
这个写法什么意思 是继承吗?该如何处理
-
初学者喊救命了!
-
如何控制两个文本框一样长