<script language="javascript" type="text/javascript">
function onload(){
var width = 0;
var height = 0;
if(navigator.userAgent.indexOf("Firefox")>0) {//是否是火狐.
height = document.body.scrollHeight;
} else {
height = document.documentElement.scrollHeight;
}
alert(height:" + height);
}
onload();
</script>
最后使用jquery:
$(window).height(); //一行代码搞定.
jquery常用: