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;
	}
}; 

Leave a Reply

Your email address will not be published. Required fields are marked *

*