Alert ($ (window). height (); // The visible area height of the current window in the browser Alert ($ (document). height (); // The height of the current window document in the browser Alert ($ (document. body). height (); // The height of the current file body in the browser window Alert ($ (document. body). outerHeight (true); // the total height of the current file body in the browser window includes border padding margin. Alert ($ (window). width (); // The width of the visible area of the current window in the browser Alert ($ (document). width (); // width of the document Object in the current window of the browser Alert ($ (document. body). width (); // The height of the current file body in the browser window Alert ($ (document. body). outerWidth (true); // The total width of the current file body in the browser window includes border padding margin // Obtain the page height and width 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... wocould also work in Explorer 6 Strict, Mozilla and Safari XScroll = document. body. offsetWidth; YScroll = document. body. offsetHeight; } } Var implements wwidth, implements wheight; If (self. innerHeight) {// all privileges t Explorer If (document.doc umentElement. clientWidth ){ Required wwidth = document.doc umentElement. clientWidth; } Else { Required wwidth = self. innerWidth; } Optional wheight = self. innerHeight; } Else { If (document.doc umentElement & document.doc umentElement. clientHeight) {// Explorer 6 Strict Mode Required wwidth = document.doc umentElement. clientWidth; Required wheight = document.doc umentElement. clientHeight; } Else { If (document. body) {// other Explorers Required wwidth = document. body. clientWidth; Optional wheight = document. body. clientHeight; } } } // For small pages with total height less then height of the viewport If (yScroll <windowHeight ){ PageHeight = running wheight; } Else { PageHeight = yScroll; } // For small pages with total width less then width of the viewport If (xScroll <1_wwidth ){ PageWidth = xScroll; } Else { PageWidth = required wwidth; } ArrayPageSize = new Array (pageWidth, pageHeight, expires wwidth, expires wheight ); Return arrayPageSize; } // Scroll bar Document. body. scrollTop; $ (Document). scrollTop (); |