<script type="text/javascript">
 
	$(window).load(function () {
			var root;
 
			root = $("body").children();
 
			var strWidth;
			var strHeight;
 
			//innerWidth / innerHeight / outerWidth / outerHeight 
			if (window.innerWidth && window.innerHeight && window.outerWidth && window.outerHeight) {
				strWidth = $(root).outerWidth(true) + (window.outerWidth - window.innerWidth);
				strHeight = $(root).outerHeight(true) + (window.outerHeight - window.innerHeight);
			}
			else {
				var strDocumentWidth = $(document).outerWidth(true);
				var strDocumentHeight = $(document).outerHeight(true);
 
				window.resizeTo(strDocumentWidth, strDocumentHeight); //IE 必须 resize 2次
 
				var strMenuWidth = strDocumentWidth - $(window).width();
				var strMenuHeight = strDocumentHeight - $(window).height();
 
				strWidth = $(root).outerWidth(true) + strMenuWidth;
				strHeight = $(root).outerHeight(true) + strMenuHeight;
			}
 
			//resize 
			window.resizeTo(strWidth, strHeight);
		});
	
	</script>
posted on 2014-02-25 17:01  吴勇寿  阅读(256)  评论(0编辑  收藏  举报