日期:2014-05-17 浏览次数:20837 次
<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轨范 - 整体结构
- CSS3——框影子(Box Shadow)
- 写了一段前端代码,TT浏览器不兼容,排字错位
- HtmlAgilityPack 爬虫批量获取百度音乐上载地址一
- 拾掇Jsp生成html文件
- css布局总是发生错位现象,该怎么解决?多谢!
- 请教:在FF下textarea的overflow:visible属性可以替代么
- 经典css遮罩层有关问题 不进来看会后悔的!
- CSS-内联元素跟块元素
- jQuery html text val 步骤
- “鼠标点击前和点机后的按钮上的图片不一样” 如何实现!
- 超链接css有关问题
- IE6上面的css调试工具
- 用仿ActionScript的语法回编写html5——第四篇,继承与简单的rpg
- 教你添加网页曝光率的几招秘诀
- IE6、七、8有些图片始终都无法显示,但IE9就可以。就求。
- IE8 CSS/DIV 网站不居间
- 网页制作,该如何处理
- iframe 滚动条有关问题
- HTML5 表单新增元素与属性【二】