日期:2014-05-17 浏览次数:20942 次
<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层显示有关问题
-
请教,除了Dreamweaver,还有没有好的HTML、CSS编辑器
-
一个request包装类,解决get方式提交数据的乱码 、html标签转义、关键词过滤有关问题
-
网页游戏WEB前端开发待遇怎么
-
求教一个有关问题
-
会移动的文字(Marquee)
-
提前应用gnome-shell补丁修正css装载有关问题
-
这个CSS为什么有有关问题
-
请问一个图片四角定位的有关问题
-
分享:崁入 YouTube 播发碼注意事項
-
转:HTML5 canvas 元素详细课程一
-
css hack的应用
-
html中锚点的施用
-
关于favicon.ico文件不显示的怪异有关问题
-
div中的<a>不显示,该如何处理
-
js a.html过3秒跳转到b.html页面,如何样实现b页面是新建的页面
-
HTML5中Canvas如何拖动元素
-
css3 圆角,影子,转换,移动,缩放简单示例用法
-
超链接怎么弹出对话框
-
怎么在CodeIgniter中引入外部的JS和CSS文件