一. jQuery获取屏幕高度:
<scripttype="text/javascript"> $(document).ready(function() { alert($(window).height());//浏览器当前窗口可视区域高度 alert($(document).height());//浏览器当前窗口文档的高度 alert($(document.body).height());//浏览器当前窗口文档body的高度 alert($(document.body).outerHeight(true));//浏览器当前窗口文档body的总高度包括borderpaddingmargin
二.jQuery获取屏幕宽度
alert($(window).width());//浏览器当前窗口可视区域宽度 alert($(document).width());//浏览器当前窗口文档对象宽度 alert($(document.body).width());//浏览器当前窗口文档body的高度 alert($(document.body).outerWidth(true));//浏览器当前窗口文档body的总宽度包括borderpaddingmargin } ) </script>
三.等号
$(window).height( )=$(document).height()=$(document.body).outerHeight()=$(document.body).height()+padding+margin+border