<!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這個屬性是當前內容位于網頁瀏覽窗口的距離。 你寫的這兩條高度明顯不在同一行,當然高度就不一樣了
? 要知道這些區別建議你看博客:http://blog.csdn.net/xiebaochun/article/details/38382169