这几节获取尺寸的都不懂,输出结果不知道为毛会是这样370*8 370*34 355*36
<!DOCTYPE HTML>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<script type="text/javascript">
var w= document.documentElement.offsetWidth
|| document.body.offsetWidth;
var h= document.documentElement.offsetHeight
|| document.body.offsetHeight;
document.write(w+"*"+h+"<br>");
var a= document.documentElement.offsetWidth;
var b= document.documentElement.offsetHeight;
document.write(a+"*"+b+"<br>");
var c= document.body.offsetWidth;
var d= document.body.offsetHeight;
document.write(c+"*"+d+"<br>");
</script>
</body>
</html>