1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" 2 "http://www.w3.org/TR/html4/strict.dtd"> 3 <html xmlns="http://www.w3.org/1999/xhtml" lang="en"> 4 <head> 5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 6 <title>test</title> 7 <meta name="author" content="Administrator" /> 8 <!-- Date: 2011-10-25 --> 9 <script language="JavaScript"> 10 function a(){ 11 document.write( 12 "屏幕分辨率为:"+screen.width+"*"+screen.height 13 +"<br />"+ 14 "屏幕可用大小:"+screen.availWidth+"*"+screen.availHeight 15 +"<br />"+ 16 "网页可见区域宽:"+document.body.clientWidth 17 +"<br />"+ 18 "网页可见区域高:"+document.body.clientHeight 19 +"<br />"+ 20 "网页可见区域宽(包括边线的宽):"+document.body.offsetWidth 21 +"<br />"+ 22 "网页可见区域高(包括边线的宽):"+document.body.offsetHeight 23 +"<br />"+ 24 "网页正文全文宽:"+document.body.scrollWidth 25 +"<br />"+ 26 "网页正文全文高:"+document.body.scrollHeight 27 +"<br />"+ 28 "网页被卷去的高:"+document.body.scrollTop 29 +"<br />"+ 30 "网页被卷去的左:"+document.body.scrollLeft 31 +"<br />"+ 32 "网页正文部分上:"+window.screenTop 33 +"<br />"+ 34 "网页正文部分左:"+window.screenLeft 35 +"<br />"+ 36 "屏幕分辨率的高:"+window.screen.height 37 +"<br />"+ 38 "屏幕分辨率的宽:"+window.screen.width 39 +"<br />"+ 40 "屏幕可用工作区高度:"+window.screen.availHeight 41 +"<br />"+ 42 "屏幕可用工作区宽度:"+window.screen.availWidth 43 ); 44 } 45 </script> 46 </head> 47 48 <body onload="a()" > 49 </body> 50 </html>
时间: 2024-11-19 02:36:43