日期:2014-05-17 浏览次数:20815 次
<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; }
![]()
推荐阅读更多>
- 小短片:什么是 HTML5
- HTML5实战与剖解之原生拖拽(三dataTransfer对象)
- Css的background的详细引见
- CSS TAB DESIGNER生成DIV+CSS领航菜单
- 用JavaScript批改CSS属性
- 在非IE内核浏览器中打开网页PPT的有关问题
- HTML初学者教程-页称号title
- 复杂学习看法HTML5标签
- DW乱码有关问题
- 关于css绝对定位有关问题
- 想用table兑现这样的布局
- getElementById 不能取得对象。找不出原因
- 【转】惯用css命名规则
- CSS式样学习笔记之二:定位
- html 标签 光标 pre 代码及时高亮
- CSS代码中怎么使banner的jpg改为播放swf
- 请教怎么设置textbox的背景色啊
- Htmlayout模拟范例一
- firefox6中的alert窗口为啥这么暗的,而且还不能拖动
- 记录html5开发的一些有关问题