• ch 窗口可见区域高度 :ch = padding + height(height不是所有内容的高度,是样式定义的高度)
  • oh border以内的内容高度: oh = border + padding + height
  • sh   padding + 最后的内容区域高度(所有内容高度): sh = padding + content_height

document.body

get***元素是针对body中的dom节点的
 

 
test:clienth208   scrollh242   offseth228
 
test2:clienth108   scrollh108   offseth128
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

offsetHeight+scrollHeight+clientHeight的更多相关文章

  1. offsetHeight,scrollHeight,clientHeight,scrollTop以及pageX,clientX,offsetX,screenX,offsetLeft,style.left等的区别以及使用详解

    一.写在前面 在阅读本文前,希望大家能针对每个属性亲手测试,网上现有的大量相关博客都有不等的概念错误,毕竟亲手实践才能更好的掌握这些概念. 1.pageX,clientX,screenX与offset ...

  2. 关于height、offsetheight、clientheight、scrollheight、innerheight、outerheight的区别

    二.也是平时经常用到的offsetheight 它返回的高度是内容高+padding+边框,但是注意哦,木有加margin哦,当然一般也木有啥需要把margin加进去的,以上代码为例,结果显示上图h2 ...

  3. 关于height、offsetheight、clientheight、scrollheight、innerheight、outerheight的区别一览

    平时,不管在pc端页面还是移动端页面,因为我们一般很少会设置某个块的的高度,但是呢,我有时候有需要取到这些高度以便于我们方便进行判断和下一步的编写.一般这个时候我都是直接的获取一个块的高度.heigh ...

  4. 转 top、postop、scrolltop、offsetTop、scrollHeight、offsetHeight、clientHeight

    1.top 此属性仅仅在对象的定位(position)属性被设置时可用.否则,此属性设置会被忽略. 复制代码 代码如下: <div style=" position:absolute; ...

  5. clientHeight & offsetHeight & scrollHeight

    clientHeight & offsetHeight & scrollHeight scrollWidth/scrollHeight,offsetWidth/offsetHeight ...

  6. top、postop、scrolltop、offsetTop、scrollHeight、offsetHeight、clientHeight

    1.top 此属性仅仅在对象的定位(position)属性被设置时可用.否则,此属性设置会被忽略 2.posTop posTop的数值其实和top是一样的,但区别在于,top固定了元素单位为px,而p ...

  7. JavaScript 基于offsetHeight和clientHeight判断是否出现滚动条

    基于offsetHeight和clientHeight判断是否出现滚动条   by:授客 QQ:1033553122 HTMLEelement.offsetHeight简介 HTMLElement.o ...

  8. JavaScript获取浏览器高度和宽度值(documentElement,clientHeight,offsetHeight,scrollHeight,scrollTop,offsetParent,offsetY,innerHeight)

    IE中: document.body.clientWidth ==> BODY对象宽度 document.body.clientHeight ==> BODY对象高度 document.d ...

  9. js中offsetHeight、clientHeight、scrollHeight等相关属性区分总结

    今天再次遇到了offset***.client***.scroll***的这三类属性的问题,总是混淆,现归纳总结如下: 大体上来说可以这样理解: client***属性(clientWidth.cli ...

随机推荐

  1. JS DOM -- 关于回车键盘事件执行事件

    一.需求制作一个模拟对话框, 二. 1.需要发送后,输入框清空 2.按enter键可发送 三.代码部分 <!DOCTYPE HTML> <html> <head> ...

  2. 机器人的运动范围 剑指offer66题

    include "stdafx.h" #include<vector> #include<algorithm> #include<string> ...

  3. bootstrap-table接合knockout.js

    function responseHandler(data) { if (data.ErrorNo > 0) { return; } var count = data.Data.TotalRow ...

  4. EXCEL VBA代码,实现点击Sheet1按钮控件保存不连续单元格的数据到Sheet2中,然后清空输入内容

    Private Sub SaveAndClear() Dim Header, Deatil, Order As Range Dim lastrow1, lastrow2 As Long Dim i A ...

  5. java httpSession 设置超时时间

    1.设置过期时间方式一:在tomcat/conf/web.xml下加入一下内容 <session-config> <session-timeout>90</session ...

  6. GDB调试,转载一位大牛的东西

    http://www.wuzesheng.com/?p=1327 手把手教你玩转GDB(一)——牛刀小试:启动GDB开始调试 写在最前面:GDB是unix相关操作系统中C/C++程序开发必不可少的工具 ...

  7. JavaWeb关于session生命周期的几种设置方法

    一般session的生命周期都是建立在用户登录系统后对用户信息进行一个记录,session类似于你有一张银行卡,而卡里的钱就是属于session存储的信息,卡掉了就不能取出里面的钱. 以前sessio ...

  8. POJ2417 Discrete Logging【BSGS】

    Discrete Logging Time Limit: 5000MS   Memory Limit: 65536K Total Submissions: 5577   Accepted: 2494 ...

  9. 【BZOJ2199】[Usaco2011 Jan]奶牛议会 2-SAT

    [BZOJ2199][Usaco2011 Jan]奶牛议会 Description 由于对Farmer John的领导感到极其不悦,奶牛们退出了农场,组建了奶牛议会.议会以“每头牛 都可以获得自己想要 ...

  10. Coursera课程《Machine Learning》学习笔记(week1)

    这是Coursera上比较火的一门机器学习课程,主讲教师为Andrew Ng.在自己看神经网络的过程中也的确发现自己有基础不牢.一些基本概念没搞清楚的问题,因此想借这门课程来个查漏补缺.目前的计划是先 ...