Screen availWidthProperty

Screen 对象参考手册Screen Object

Definition and Usage

The availWidth property declares the available width of the screen displaying the browser, in pixels. In operating systems such as Windows, this available height does not include the vertical space allocated to semi-permanent features (such as the taskbar at the bottom of the screen).

Syntax

screen.availWidth


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the availWidth property


Example

Example

Return the available width of the screen:

<script>

document.write("Available width: " + screen.availWidth);

</script>

The output of the above example is:


Try it Yourself »


实例

More Examples

This example contains all screen properties


Screen 对象参考手册Screen Object Other Extensions