您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

基于jquery的获取浏览器窗口大小的代码_jquery

2025/9/18 12:54:00发布32次查看
复制代码 代码如下:
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);
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product