為什么打印出的實(shí)際高度為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)頁(yè)實(shí)際高度:"+h+"<br/>實(shí)際寬度:"+w);
</script>
2017-01-04
document.body.scrollWidth放前面 ?后面||接document.documentElement.scrollWidht就可以了!別問(wèn)我為什么?其實(shí)我也不知道/(ㄒoㄒ)/~~
2016-09-29
剛開(kāi)始頁(yè)面中沒(méi)有內(nèi)容,就只有一個(gè)外邊距為,因?yàn)闆](méi)有內(nèi)容,上下外邊距重疊為8px,所以得到的是8px;
2016-09-17
2016-09-08
我個(gè)人理解是慕課網(wǎng)的那個(gè)網(wǎng)頁(yè)編譯器的高度,不是外邊游覽器的高度
2016-09-08
同問(wèn),我也疑惑為什么是8