日期:2014-05-17 浏览次数:21277 次
<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;
}
推荐阅读更多>
-
html向swf传送参数的方法
-
页面加载时指定的文本框自动取得焦点
-
css影子
-
Android的TextView使用Html来处置图片显示、字体样式、超链接等
-
创建网页表格的基本原则和方法(一)
-
php apache支持shtml 资料 php支持ssi语句
-
css滤镜兑现全站图片呈灰度
-
惯用的Struts html-taglib简单说明
-
应用HtmlUnit抓取百度搜索结果
-
网站主页这个meta是做什么的呢
-
【HTML5活动】HTML5 Canvas兑现贪吃蛇
-
【国庆快乐,】一个关于图片显示的有关问题
-
XHTML与CSS的面向对象编程
-
(急吧)批改一个div 另一个跟着变
-
HTML之影像地图
-
FreeMarker 生成静态html(举例来说)
-
dhtmlgrid批改,支持IE10
-
kindeditor中换行有关问题!
-
html jquery 制作map
-
HTML页面动态增多下拉列表,求定位删除方法