日期:2014-05-17 浏览次数:20871 次
<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; }
![]()
推荐阅读更多>
- <p>的行间距如何做
- HTML5各浏览器支持景况一览表
- xhtml构造语义化小结
- flash实现房子室内效果图,并且插入HTML代码中 急
- 在HTML中给Flash添加链接 屏蔽Flash右键
- css 实现下上左右方向滚动字幕
- CSS文字描边有关问题?
- JQ行抉择 CSS3伪类选择器:nth-child()
- 将XHTML+CSS页面转换为打印机页面
- 哪位大侠能帮小弟我把这个圆角矩形挖出来
- div不能水平居中解决办法
- iframe中的表头怎么固定不动
- 惯用网页设计js收集
- document.execCommand()的用法
- 设计可用的表单:表单的三层模型
- android中jsoup解析html的几个事例
- 纯css上拉菜单
- HTML教程-各窗口间相互操作(Frame Target)_Html基础教程_HtmlCss教程
- HTML5德州市21点扑克牌源码
- Html的几个小技巧