日期:2014-05-17 浏览次数:20889 次
<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 资料操作API
- 关于用CSS设置下拉框样式解决思路
- HTML之字体标志
- html转txt,防止XSS破绽
- html 文本标签 的 onchange时间 实施 机制
- 冲破浏览器客户端获取真实IP的方法
- W3C教程(8):W3C XML Schema 活动
- java html变换为word文档
- 30网页设计美丽纹路的启示
- HTML5后台代码能用哪些语言去实现?解决思路
- CSS3的卡通泡沫按钮
- html+css小结
- 制作的网站在火狐,TT浏览器上幻灯片显示不了
- 关于radio对象的属性,该如何处理
- 前台是个什么东西(2)-CSS 小测试
- Head中的link、meta、的元素跑到body里面去了,该怎么处理
- css+div小小小结
- jquery html5 兑现placeholder 兼容password ie6
- 请问下关于table的宽度有关问题