05-解决方案
6.1.2 解决方案
jQuery的 width 和 height 方法提供对窗口或者文档基本尺寸的简单访问:
jQuery(document).ready(function() {
alert('Window height: ' + jQuery(window).height()); // 返回视区高度
alert('Window width: ' + jQuery(window).width()); // 返回视区宽度
alert('Document height: ' + jQuery(document).height()); // 返回文档高度
alert('Document width: ' + jQuery(document).width()); //返回文档宽度
});