<script type="text/javascript">
$(document).ready(function()
{
alert($(window).height()); //The height of the visible area of the lower window in the browser
alert($(document). height()); //The height of the window document under the browser
alert($(document.body).height());//The height of the window document body under the browser
alert($(document.body).outerHeight(true ));//The total height of the document body of the lower window in the browser includes border padding margin
alert($(window).width()); //The width of the visible area of the lower window in the browser
alert($(document).width() );//The window document under the browser is for the image width
alert($(document.body).width());//The height of the window document body under the browser
alert($(document.body).outerWidth(true)) ;//The total width of the window document body in the browser includes border padding margin
}
)
</script>
http://www.cnblogs.com/liyuxin/archive/2011/10/06/2199939.html