亲测兼容各种浏览器(IE、Firefox、chrome、360、Opera。。。)
获取浏览器的窗口的宽度和高度:<script type=”text/javascript”>
var winWidth = 0;
var sinHeight = 0;
//获取宽度
if(window.innerWidth)
winWidth = window.innerWidth;
else if((document.body) && (document.body.clientWidth))
winWidth = document.body.clientWidth;
//获取高度
if(window.innerHeight)
winHeight = window.innerHeight;
else if((document.body)&nb...