手机
当前位置:查字典教程网 >编程开发 >Javascript教程 >ff chrome和ie下全局动态定位的异同及全局高度的取法
ff chrome和ie下全局动态定位的异同及全局高度的取法
摘要:DTD已声明IEdocument.documentElement.scrollHeight浏览器所有内容高度,document.body.s...

DTD已声明

IE

document.documentElement.scrollHeight 浏览器所有内容高度 ,document.body.scrollHeight 浏览器所有内容高度

document.documentElement.scrollTop 浏览器滚动部分高度,document.body.scrollTop 始终为0

document.documentElement.clientHeight 浏览器可视部分高度,document.body.clientHeight 浏览器所有内容高度

FF

document.documentElement.scrollHeight 浏览器所有内容高度 ,document.body.scrollHeight 浏览器所有内容高度

document.documentElement.scrollTop 浏览器滚动部分高度,document.body.scrollTop 始终为0

document.documentElement.clientHeight 浏览器可视部分高度,document.body.clientHeight 浏览器所有内容高度

Chrome

document.documentElement.scrollHeight 浏览器所有内容高度, document.body.scrollHeight 浏览器所有内容高度

document.documentElement.scrollTop 始终为0,document.body.scrollTop 浏览器滚动部分高度

document.documentElement.clientHeight 浏览器可视部分高度,document.body.clientHeight 浏览器所有内容高度

DTD未声明

IE

document.documentElement.scrollHeight 浏览器可视部分高度,document.body.scrollHeight 浏览器所有内容高度

document.documentElement.scrollTop 始终为0,document.body.scrollTop 浏览器滚动部分高度

document.documentElement.clientHeight 始终为0,document.body.clientHeight 浏览器可视部分高度

FF

document.documentElement.scrollHeight 浏览器可视部分高度, document.body.scrollHeight 浏览器所有内容高度

document.documentElement.scrollTop 始终为0,document.body.scrollTop 浏览器滚动部分高度

document.documentElement.clientHeight 浏览器所有内容高度,document.body.clientHeight 浏览器可视部分高度

Chrome

document.documentElement.scrollHeight 浏览器可视部分高度,document.body.scrollHeight 浏览器所有内容高度

document.documentElement.scrollTop 始终为0,document.body.scrollTop 浏览器滚动部分高度

document.documentElement.clientHeight 浏览器所有内容高度,document.body.clientHeight 浏览器可视部分高度

浏览器所有内容高度即浏览器整个框架的高度,包括滚动条卷去部分+可视部分+底部隐藏部分的高度总和

浏览器滚动部分高度即滚动条卷去部分高度即可视顶端距离整个对象顶端的高度。

DTD声明,指的是浏览器页面载入时候的声明:<!DOCTYPE html public ""....>

声明文档类型html

【ff chrome和ie下全局动态定位的异同及全局高度的取法】相关文章:

JavaScript判断数组是否包含指定元素的方法

jQuery fancybox在ie浏览器下无法显示关闭按钮的解决办法

JQuery中attr方法和removeAttr方法用法实例

Javascript动态创建表格及删除行列的方法

jQuery实现自动滚动到页面顶端的方法

JavaScript实现DIV层拖动及动态增加新层的方法

JavaScript中的异常处理方法介绍

javascript动态创建链接的方法

jquery实现动态改变div宽度和高度

jQuery判断指定id的对象是否存在的方法

精品推荐
分类导航