js 获取页面内容可见区域的高度和宽度

var h = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;   //height
var w = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;      //width

 

posted @ 2015-09-05 10:48  狄枫  阅读(770)  评论(0编辑  收藏  举报