//js 兼容各浏览器 var h = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight; //height var w = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth; //width