js中关于可视区、实际区域一些知识的个人理解

var clientW = document.documentElement.clientWidth || document.body.clientWidth;
var clientH = document.documentElement.clientHeight || document.body.clientHeight;
var offsetW = document.documentElement.scrollWidth || document.body.scrollWidth;
var offsetH = document.documentElement.scrollHeight || document.body.scrollHeight;
        
var bodyW = (offsetW>clientW)?offsetW:clientW;
var bodyH = (offsetH>clientH)?offsetH:clientH;
posted @ 2012-10-14 23:09  {前端开发}  阅读(208)  评论(0编辑  收藏  举报