為什么打印出的實際高度為8?
?我用firebug查看明明就是36px啊
<script type="text/javascript">
? ? var w = document.documentElement.scrollWidth
? ? ? ? || document.body.scrollWidth;
? ? var h = document.documentElement.scrollHeight
? ? ? ? || document.body.scrollHeight;
? ? document.write("網(wǎng)頁實際高度:"+h+"<br/>實際寬度:"+w);
</script>
2017-01-04
document.body.scrollWidth放前面 ?后面||接document.documentElement.scrollWidht就可以了!別問我為什么?其實我也不知道/(ㄒoㄒ)/~~
2016-09-29
剛開始頁面中沒有內(nèi)容,就只有一個外邊距為,因為沒有內(nèi)容,上下外邊距重疊為8px,所以得到的是8px;
2016-09-17
2016-09-08
我個人理解是慕課網(wǎng)的那個網(wǎng)頁編譯器的高度,不是外邊游覽器的高度
2016-09-08
同問,我也疑惑為什么是8