欢迎光临阿斌的博客! QQ:496087321 更多精彩请访问:谢斌个人博客

得到当前页面高度和宽度的两个函数

 

//======需引用jquery框架======//

//返回当前页面高度

function pageHeight(){
if($.browser.msie){
return document.compatMode == "CSS1Compat"? document.documentElement.clientHeight :
document.body.clientHeight;
}
else{
return self.innerHeight;
}
};



//返回当前页面宽度
function pageWidth(){
if($.browser.msie){
return document.compatMode == "CSS1Compat"? document.documentElement.clientWidth :
document.body.clientWidth;
}
else{
return self.innerWidth;
}
};

 

posted on 2010-02-20 17:20  阿斌1986  阅读(517)  评论(6编辑  收藏  举报

欢迎光临阿斌的博客! QQ:496087321 更多精彩请访问:谢斌个人博客