Alert ($ (window). Height ()); Browser current window visual area height Alert ($ (document). Height ()); The height of the browser's current window document Alert ($ (document.body). Height ());//browser Current window document body level Alert ($ (document.body). Outerheight (True))//Browser Current window document body's total height includes border padding margin Alert ($ (window). width ()); Browser current window visual area width Alert ($ (document). width ());//browser Current window Document object widths Alert ($ (document.body). width ());//browser Current window document body height Alert ($ (document.body). Outerwidth (True))//Browser The total width of the body of the current window document includes border padding margin Get the height, width of the page function GetPageSize () { var xscroll, Yscroll; if (window.innerheight && window.scrollmaxy) { Xscroll = window.innerwidth + Window.scrollmaxx; 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...would also work in Explorer 6 Strict, Mozilla and Safari Xscroll = Document.body.offsetWidth; Yscroll = Document.body.offsetHeight; } } var windowwidth, WindowHeight; if (self.innerheight) {//all except Explorer if (document.documentElement.clientWidth) { WindowWidth = Document.documentElement.clientWidth; } else { WindowWidth = Self.innerwidth; } WindowHeight = Self.innerheight; } else { if (document.documentelement && document.documentElement.clientHeight) {//Explorer 6 Strict Mode WindowWidth = Document.documentElement.clientWidth; WindowHeight = Document.documentElement.clientHeight; } else { if (document.body) {//other explorers WindowWidth = Document.body.clientWidth; WindowHeight = Document.body.clientHeight; } } } For small pages and total height less then height of the viewport if (Yscroll < WindowHeight) { PageHeight = WindowHeight; } else { PageHeight = Yscroll; } For small pages and total width less then width of the viewport if (Xscroll < windowwidth) { PageWidth = Xscroll; } else { PageWidth = WindowWidth; } Arraypagesize = new Array (PageWidth, PageHeight, WindowWidth, windowheight); return arraypagesize; } scroll bar Document.body.scrollTop; $ (document). ScrollTop (); |