<!DOCTYPE?HTML>
<html>
<head>
<meta?http-equiv="Content-Type"?content="text/html;?charset=utf-8">?
</head>
<body>
<script?type="text/javascript">
var?wid=document.documentElement.scrollWidth||document.body.scrollWidth;
var?hei=document.documentElement.scrollHeight||document.body.scrollHeight;
document.write("kuan"+wid+"???"+"gao"+hei)
document.write("<br/>");
var?wid=document.documentElement.scrollWidth||document.body.scrollWidth;
var?hei=document.documentElement.scrollHeight||document.body.scrollHeight;
document.write("kuan"+wid+"???"+"gao"+hei)
</script>
</body>????
</html>
2017-11-15
Scroll這個屬性是當(dāng)前內(nèi)容位于網(wǎng)頁瀏覽窗口的距離。 你寫的這兩條高度明顯不在同一行,當(dāng)然高度就不一樣了
? 要知道這些區(qū)別建議你看博客:http://blog.csdn.net/xiebaochun/article/details/38382169