The effect is as follows:
The code is as follows:
<HTML><Head><title>Gets the current object size, screen resolution, and so on</title><Body><Divstyle= "width:88%;margin:30px auto; color:blue;"ID= "div_html"></Div> <Scripttype= "Text/javascript"> vars= ""; S+= "width of visible area of Web page:"+Document.body.clientWidth+"<br/>"; S+= "Web page Visible Area High:"+Document.body.clientHeight+"<br/>"; S+= "width of visible area of Web page:"+Document.body.offsetWidth+ "(including edges and width of scroll bars)"+"<br/>"; S+= "Web page Visible Area High:"+Document.body.offsetHeight+ "(including the width of the edge)"+"<br/>"; S+= "page Body Full text width:"+Document.body.scrollWidth+"<br/>"; S+= "page Body Full text High:"+Document.body.scrollHeight+"<br/>"; S+= "The Web page is rolled away high (FF):"+Document.body.scrollTop+"<br/>"; S+= "Web page is rolled away high (ie):"+Document.documentElement.scrollTop+"<br/>"; S+= "webpage is rolled away left:"+Document.body.scrollLeft+"<br/>"; S+= "on the body part of the webpage:"+Window.screentop+"<br/>"; S+= "page body part left:"+Window.screenleft+"<br/>"; S+= "High screen resolution:"+Window.screen.height+"<br/>"; S+= "width of screen resolution:"+Window.screen.width+"<br/>"; S+= "screen usable workspace height:"+Window.screen.availHeight+"<br/>"; S+= "screen Usable workspace width:"+Window.screen.availWidth+"<br/>"; S+= "your screen settings are"+window.screen.colorDepth+"bit color"+"<br/>"; S+= "your screen settings"+Window.screen.deviceXDPI+"pixels per inch"+"<br/>";
document.getElementById ("div_html"). InnerHTML=s; </Script></Body></HTML>
The code description diagram is as follows:
Source: JS Gets the current object size and screen resolution, etc.
JS gets the current object size and screen resolution, etc.