Javascript screen availWidth property returns the available width of the display screen of the computer monitor based on resolution of the screen. availWidth property of screen object gives approximate value of width available to display the content in a browser along x-axis. Value returned by javascript screen object availWidth property does not match the actual available space inside the body section of web browsers due to number of toolbars and some other properties such as status bar and scrollbars. availWidth property returns the width in pixels without excluding the width of window’s taskbar coz in Windows operation system, according to default settings, position of taskbar is bottom of display screen.

Syntax for Javascript Screen availWidth property

screen.availWidth

or

window.screen.availWidth

You can use any of the above syntax to access the javascript screen availWidth property.

Examples of Javascript Screen availWidth property

<script type="text/javascript" language="javascript">
    document.write(screen.availWidth);

    document.write("<br />");

    document.write(window.screen.availWidth);
</script>

Continue to next tutorial: Javascript screen availHeight property to learn how to get available screen height.

Recent JavaScript Tutorials

Javascript FSO ShortPath property

Javascript FileSystemObject (FSO) provides a ShortPath property that can be accessed using the folder object or file object returned by the GetFolder or GetFile method.

Javascript FSO Path Property

Javascript FileSystemObject (FSO) provides the Path property that can be accessed through the file object or folder object returned by the GetFile or GelFolder method

Javascript FSO Type property

Javascript FileSystemObject (FSO) provides a Type property that can be accessed through file object or folder object returned by the GetFile or GetFolder method

Javascript FSO ShortName property

Javascript FileSystemObject (FSO) provides a ShortName property that can be accessed using the folder object or file object returned by the GetFolder or GetFile method.

Javascript FSO Name Property

Javascript FileSystemObject (FSO) provides a Name property that can be accessed using file object or folder object.