document.body与document.documentElement
document.body 获取的是body,document.documentElement获取的是html,在任何浏览器上都是如此
相关问题:
1.获取页面滚动条滚动距离
chrome,safari上用document.body.scrollTop,document.documentElement.scrollTop恒为0
firefox,IE上用document.documentElement.scrollTop,document.body,scrollTop恒为0
2.document.documentElement.offsetHeight在非IE浏览器上都是获取html的实际高度,而在IE上是可看见的部分区域的高度!
document.body与document.documentElement的更多相关文章
- document.body、document.documentElement和window获取视窗大小的区别
来源:http://www.ido321.com/906.html 在w3school关于window对象的介绍中,介绍了获取浏览器窗口大小的三种方法(浏览器的视口,不包括工具栏和滚动条). 对于In ...
- document.body 和 document.documentElement 的区别
document.body 和 document.documentElement 的区别 : www.cnblogs.com/scy251147/archive/2011/04/10/2011420. ...
- document.body和document.documentElement区别
1.document.documentElement表示文档节点树的根节点,即<html> document.body是body节点 2. 页面具有 DTD,或者说指定了 DOCTYPE ...
- document.body、document.documentElement和window获取视窗大小的差别
来源:http://www.ido321.com/906.html 在w3school关于window对象的介绍中,介绍了获取浏览器窗体大小的三种方法(浏览器的视口,不包含工具栏和滚动栏). 对于In ...
- document.documentElement和document.body 与document.compatMode的关系
首先我们看看document.compatMode(兼容模式): document.compatMode它有两种可能的返回值:BackCompat和CSS1Compat, document.compa ...
- (document).height()、$(document).scrollTop()
(document).height().$(document).scrollTop(),有需要的朋友可以参考下. jQuery(window).height()代表了当前可见区域的大小,而jQuery ...
- document.images、document.forms、doucument.links——>HTMLCollection
由于历史原因,HTMLDocument类定义了一些快捷属性来访问各种各样的节点.例如,images.forms.links等属性指向香味类似只读数组的<img>.<form>. ...
- javascript中document.appendChild和document.body.appendChild的问题
在IE7中 var conentDiv = document.createElement("div"); document .body .appendChild(conentDiv ...
- 各浏览器对使用 document.id 和 document.name 获取对象的支持存在差异
标准参考 无. 问题描述 各浏览器使用 document.id 和 document.name 方法获取对象引用的支持存在差异. 造成的影响 某些浏览器中通过 document.id 和 docume ...
- Make the “Check out” function available in the office document opened with Document ID link
I found a solution to make the “Check out” function available in the office document opened with Doc ...
随机推荐
- PAT 团体程序设计天梯赛-练习集L1-011. A-B
本题要求你计算A-B.不过麻烦的是,A和B都是字符串 —— 即从字符串A中把字符串B所包含的字符全删掉,剩下的字符组成的就是字符串A-B. 输入格式: 输入在2行中先后给出字符串A和B.两字符串的长度 ...
- HDU 1969 Pie(二分查找)
Problem Description My birthday is coming up and traditionally I'm serving pie. Not just one pie, no ...
- assign retain copy
举个例子: NSString *houseOfMM = [[NSString alloc] initWithString:'装梵几的三室两厅']; 上面一段代码会执行以下两个动作: 1 在堆上分配一 ...
- 从零开始学Axure原型设计(进阶篇)
Axure不仅能制作静态的视觉稿.页面,还能添加交互动作,是进行原型设计的最佳软件之一.在认识了Axure的界面和部件库之后,我们可以用它来画线框图了,但是静态的线框图在表达上不如有交互的原型图来得直 ...
- ubuntu libtiff-dev
cc@cc:~$ dpkg -L libti libtiff5 libtiffxx5 libtimezonemap1 libtinyxml2- libtiff5-dev libtimedate-per ...
- ElasticSearch(5)-Mapping
一.Mapping概述 映射 为了能够把日期字段处理成日期,把数字字段处理成数字,把字符串字段处理成全文本(Full-text)或精确的字符串值,Elasticsearch需要知道每个字段里面都包含了 ...
- iOS之文件解析
JSON JSON – OC 转换对照表 JSON OC {} NSDictonary [] NSArray "" NSString 数字 10,10.5 NSNumber NSJ ...
- kvstore之memcached为存储介质
ecstore中kvstore选用memcached作为存储介质 kvstore存储类选用base_kvstore_memcached(app/base/lib/kvstore/memcached.p ...
- 菲菲更名宝贝(批量更名软件) v8.0 绿色版
软件名称: 菲菲更名宝贝(批量更名软件)软件语言: 简体中文授权方式: 免费软件运行环境: Win7 / Vista / Win2003 / WinXP 软件大小: 1.5MB图片预览: 软件简介:菲 ...
- 【python问题系列--3】TypeError: 'builtin_function_or_method' object has no attribute '__getitem__'
p0V,p1V,pSpam=trainNBO(array[trainMat],array(trainClasses)) 改为: p0V,p1V,pSpam=trainNBO(array(trainMa ...