复制代码 代码如下: function getTotalHeight(){ if($.browser.msie){ return document.compatMode == "CSS1Compat"? document.documentElement.clientHeight : document.body.clientHeight; } else { return self.innerHeight; } } function getTotalWidth (){ if($.browser.msie){ return document.compatMode == "CSS1Compat"? document.documentElement.clientWidth : document.body.clientWidth; } else{ return self.innerWidth; } } var do_height = getTotalHeight(); var do_width = getTotalWidth(); alert("do_height=="+do_height+"ndo_width=="+do_width);
推荐阅读
基于Jquery的仿照flash放大图片效果代码
Html: 复制代码 代码如下: <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Style-Type" content="text>>>详细阅读
本文标题:基于jquery的获取浏览器窗口大小的代码
地址:http://www.17bianji.com/kaifa2/JS/24794.html
1/2 1