<!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>Scroll这个属性是当前内容位于网页浏览窗口的距离。 你写的这两条高度明显不在同一行,当然高度就不一样了
要知道这些区别建议你看博客:http://blog.csdn.net/xiebaochun/article/details/38382169