手机
当前位置:查字典教程网 >编程开发 >Javascript教程 >基于jquery的获取浏览器窗口大小的代码
基于jquery的获取浏览器窗口大小的代码
摘要:复制代码代码如下:functiongetTotalHeight(){if($.browser.msie){returndocument.co...

复制代码 代码如下:

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的获取浏览器窗口大小的代码】相关文章:

js获取变量

网页里控制图片大小的相关代码

基于jquery实现下拉框美化特效

jquery使用经验小结

jQuery获取页面元素绝对与相对位置的方法

精确到分钟的js日历控件,日期选择器代码

获得当前页面URL地址的三个JS代码

Jquery跨浏览器文本复制插件Zero Clipboard的使用方法

强制设为首页代码

你一定会收藏的Nodejs代码片段

精品推荐
分类导航