任务提问!
<!DOCTYPE HTML> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> </head> <body> <p>1</p> <p>2</p> <p>3</p> <p>4</p> <p>5</p> <p>6</p> <p>7</p> <script type="text/javascript"> var w= document.documentElement.offsetWidth || document.body.offsetWidth; var h= document.documentElement.offsetHeight || document.body.offsetHeight; document.write("w:"+w+"<br>"); document.write("h:"+h+"<br>"); </script> </body> </html>
答案:
1
2
3
4
5
6
7
w:302
h:282
感觉尺寸这几节课讲的太抽象了!连个图片解释都没有!