javascript document height, width

height, width NN 4 IE n/a DOM n/a

Read-only

Return the pixel dimensions of the entire rendered document. These values coincide with the offsetHeight and offsetWidth property values for the document.body object. Since neither property pairing is yet sanctioned by the W3C DOM, you might prefer the offset pair, because they are at least cross-browser compatible.

 
Example
 
var howTall = document.height;
 
Value

Number of pixels.

 
Default

Current document size.


554,Nickname,Homepage or email,Comments here,Add comment