网页尺寸的获取,为何高度很小
<!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); </script> </body> </html>