日期:2014-05-17 浏览次数:20895 次
<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之表格标志
- 有没有一种免费的起动迅速的基于HTML的文字处理器
- 如何在网页制作中用好表格_HTML综合技巧_HtmlCss教程
- ie6下这个页面的弹出层下面如何多出一个空区域
- 为什么在div里面的样式padding-bottom的效果却同margin-bottom效果一样呢?该怎么处理
- css成效
- css背景自适应文字宽度旋钮
- <link rel="shortcut icon" href="favicon.ico" />显示不了图标,该怎么解决
- css新手上路(1)
- Approach to HTML5 演说预告
- 2011年60款漂亮的免费 HTML5 / CSS3 网站模板(3)
- HTML 报表
- 网页语种识别,该如何解决
- div流式格局
- 关于SWFupload环境的有关问题
- 技巧运用无极限 HTML表格运用从入门到知晓
- HTML页面跳转(重定向)的5种方法
- 报纸仿真,该如何解决
- 怎么让一个div中的内容不换行
- html5 中新的naturalWidth跟naturalHeight属性