日期:2014-05-17 浏览次数:20860 次
<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; }
![]()
推荐阅读更多>
- 怎么在图片上做1个链 点击后 直接连接到QQ? 先谢了。
- css IE6版本 左边距显示不正常有关问题
- html中flash与链接的有关问题
- 现时就能投入使用的12个高端大气上档次的CSS3特性
- 造型说明div+css相对定位和绝对定位用法
- 容易美观的CSS3登录表单
- IE粘贴图片自动下传功能
- 腾讯的这个JS幻灯机太难扣了,求高人指点。
- IE6佯死
- html中运用微软特定标记检测ie版本
- 如何在html页面下画出这种饼图
- HTML5占位文本的跨浏览器(PlaceHolder)议案
- html框架里的站内搜索,该怎么处理
- 初学者提问:各位 jequry中这么写可以吗
- 28个您必须知道的HTML5的新特性,技巧以及技术
- CSS图片分割 CSS Sprites 将多个背景集成到一个png图片下CSS定位
- SPRING-MVC访问静态资料,如jpg,js,css
- html滚动条解决方案
- 黑一上HTML5 看下去很美
- java 有关问题 关于htmlunit如何避免图片的有关问题