A problem with 0 document. Documentelement. Clientwidth

Explain the function of static keyword and final keyword in Java in detail>>>

A little research on getting the visible window size of various browsers
& lt; script>
function getInfo()
{
var s = “”;
s = “the visible area of the web page is wide:” document.body.clientwidth
s = “high visible area of web page:” document.body.clientheight
s = “width of visible area of web page:” document. Body. Offsetwidth “(including width of border and scroll bar)”
s = “height of visible area of webpage:” document. Body. OffsetHeight “(including width of sideline)”
s = “document.body.scrollwidth
s = “document.body.scrollheight
s = “the height of the web page being rolled out (FF):” document.body.scrolltop
s = the height of the web page being rolled out: “document.documentelement.scrolltop
s = “the left side of the web page being scrolled:” document. Body. Scrollleft
s = “window.screentop
s = “window.screenleft
s = high screen resolution: “window.screen.height
s = width of screen resolution: “window.screen.width
s = “screen available workspace height:” window.screen.availheight
s = “window.screen.availwidth

s = your screen setting is “window.screen.colordepth” bit color
s = “your screen settings” window.screen.devicexdpi “pixel/inch”
//alert (s);
}
getInfo();
</ script> you can use
document. Body. Clientwidth
document. Body. Clientheight
in ie, Firefox and opera, which is very simple and convenient<
in company projects:
opera still uses
document. Body. Clientwidth
document. Body. Clientheight
but IE and Firefox use
document. Documentelement. Clientwidth
document. Documentelement. Clientheight
it turns out that W3C standards are making a fuss
& lt;! DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” ” http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd “>
if you add this line of tag to the page, in ie:
document. Body. Clientwidth = = > Body object width
document. Body. Clientheight = = > Body object height
document. Documentelement. Clientwidth = = > Visible area width
document. Documentelement. Clientheight = = > Visible area height
in Firefox:
document. Body. Clientwidth = = > Body object width
document. Body. Clientheight = = > Body object height
document. Documentelement. Clientwidth = = > Visible area width
document. Documentelement. Clientheight = = > The height of visible area

in Opera:
document. Body. Clientwidth = = > Visible area width
document. Body. Clientheight = = > Height of visible area
document. Documentelement. Clientwidth = = > Page object width (body object width plus margin width)
document.documentelement.clientheight = = > The height of page object (that is, the height of body object plus the height of margin)
if there is no W3C standard defined,
ie is:
document. Documentelement. Clientwidth = = > 0
document.documentElement.clientHeight ==> 0
Firefox is:
document. Documentelement. Clientwidth = = > Page object width (body object width plus margin width) document.documentelement.clientheight = = > Page object height (body object height plus margin height)
opera is:
document.documentelement.clientwidth = = > Page object width (body object width plus margin width) document.documentelement.clientheight = = > Page object height (body object height plus margin height)

Similar Posts: