Javascript Reference
Categories: screen

javascript screen height, width

@March 15, 2008, 1:22 a.m.
height, widthFirefox/Netscape/NN 4 IE 4 Chrome/Safari/DOM n/a  

Read-only  

Return the number of pixels available vertically and horizontally in the client video monitor. This is the raw dimension. For the amount of screen space not covered by system bars, see availHeight and availWidth.

 
Example
 
if (screen.height > 480 && screen.width > 640) {
    ...
}
 
Value

Integer of pixel counts.

 
Default

Depends on video monitor.


Powered by Linode.