Screen heightProperty

Screen 对象参考手册Screen Object

Definition and Usage

The height property declares the height of the screen that displays the browser, in pixels.

Syntax

screen.height


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the height property.


Example

Example

Return the total height of your screen:

<script>

document.write("Total height: " + screen.height);

</script>

The above example outputs:


Try it yourself »


实例s

More Examples

This example contains all the screen properties.


Screen 对象参考手册Screen Object Other Extensions