var width = window.innerWidth; var height = window.innerHeight; if(typeof width != 'number'){//IE 5/6/7/8 if(document.compatMode == 'CSS1Compat'){ width = document.documentElement.clientWidth; height = document.docuementElement.clientHeight; }else{ width = document.body.clientWidth; height = document.body.clientHeight; }
计算window窗口大小
猜你喜欢
转载自luqingxuan.iteye.com/blog/2271366
今日推荐
周排行