网页内容的高度和宽度,“内容”二字怎么理解??
这个是输出结果:
669*8
669*34
669*958
以下是代码:
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> </head> <body> <script type="text/javascript"> var w=document.documentElement.scrollWidth|| document.body.scrollWidth; var h=document.documentElement.scrollHeight|| document.body.scrollHeight; document.write(w+"*"+h+"<br>"); var w=document.documentElement.scrollWidth var h=document.documentElement.scrollHeight document.write(w+"*"+h+"<br>"); var w=document.body.scrollWidth; var h=document.body.scrollHeight; document.write(w+"*"+h+"<br>"); </script> </body> </html>