两个高怎么是这样,大佬能解释下吗
<script type="text/javascript">
var h=document.body.offsetHeight;
document.write(h+"<br>");//结果为0
var w=document.body.offsetWidth;
document.write(w+"<br>");
var w= document.documentElement.offsetWidth;
document.write(w+"<br>");
var h= document.documentElement.offsetHeight;
document.write(h);//结果为79
</script>