"网页内容实际高度小于 clientHeight 时,scrollHeight 返回 clientHeight 。" 教程上是这么说的,然而下面的代码好像打脸了。。谁能告诉我为啥啊?多谢!
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<script type="text/javascript">
document.write(document.body.scrollWidth + "<br>");
document.write(document.body.scrollHeight + "<br>");
document.write(document.body.clientWidth + "<br>");
document.write(document.body.clientHeight + "<br>");
</script>
</body>
</html>