Visible area width of the webpage: "+ document. Body. clientwidth;
Visible area Height: "+ document. Body. clientheight;
Visible area width of the webpage: "+ document. Body. offsetwidth +" (including the width of the edge and scroll bar )";
Visible area height of the webpage: "+ document. Body. offsetheight +" (including the width of the edge )";
Webpage text width: "+ document. Body. scrollwidth;
Webpage text Height: "+ document. Body. scrollheight;
Page size: "+ document. Body. scrolltop;
Left of the webpage to be rolled: "+ document. Body. scrollleft;
On the webpage body part: "+ window. screentop;
Left part of the webpage body: "+ window. screenleft;
Screen Resolution Height: "+ window. Screen. height;
Screen Resolution width: "+ window. Screen. width;
Available screen workspace Height: "+ window. Screen. availheight;
Available screen workspace width: "+ window. Screen. availwidth;
Your screen is set to "+ window. Screen. colordepth +" bit color ";
Your Screen Settings "+ window. Screen. devicexdpi +" pixel/Inch ";
special 1.
solution for document. Body. scrolltop is always 0
var scrollpos;
If (typeof window. pageyoffset! = 'Undefined') {
scrollpos = Window. pageyoffset;
}< br> else if (typeof document. compatmode! = 'Undefined' &
document. compatmode! = 'Background') {
scrollpos = document.doc umentelement. scrolltop;
}< br> else if (typeof document. Body! = 'Undefined') {
scrollpos = Document. Body. scrolltop;
}< br> alert (scrollpos);
Special 2,
Webpage text width: "+ document. Body. scrollwidth;
Webpage text Height: "+ document. Body. scrollheight;
If the preceding functions cannot be obtained, use the following method.
VaR xscroll, yscroll;
If (window. innerheight & window. scrollmaxy)
{
Xscroll = Document. Body. scrollwidth;
Yscroll = Window. innerheight + window. scrollmaxy;
} Else if (document. Body. scrollheight> document. Body. offsetheight) {// all but explorer Mac
Xscroll = Document. Body. scrollwidth;
Yscroll = Document. Body. scrollheight;
} Else
{// Explorer Mac... wocould also work in Explorer 6 strict, Mozilla and Safari
Xscroll = Document. Body. offsetwidth;
Yscroll = Document. Body. offsetheight;
}