日期:2014-05-17 浏览次数:20853 次
<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文本框 平添 onkeyup事件
- html标签<table>有关问题
- CSS兼容性(IE和Firefox)技艺大全
- 请教开发wap站点用什么语言最好
- CSS完善兼容IE6/IE7/IE8/IE9/IE10的通用方法
- 兼容IE超出一部分滚动,未超出不显示滚动条
- CSDN 论坛的框架为什么要弄成这样?解决方法
- HTML标志一定不要遗忘封锁
- HTML5有关资源-书目
- 小菜一碟:怎么实现字体滚动效果?SPA软件|收银软件
- css3 transition简略使用
- IE6和火狐兼容有关问题
- icon如何使用
- 怎么让表格的宽度自适应列宽的总和
- 咨询下一下css+div,标题右上角显示 "new"或其他,该怎么处理
- HTML特殊字符示意
- 复杂看法HTML5:HTML5的设计思想
- 做网站改css撞见这么个东西
- HTML元素 - 地图的用法
- 一个html因为margin加倍导致的有关问题