screen.availWidth
JavaScript 1.2+, JScript 3+ Nav4+, IE4+ Syntax
screen.availWidth
Description
The availWidth property of the screen object accesses the available pixel width of the user's screen. This width is minus any toolbar or any other "permanent" objects that may be on the user's screen.
Example
Listing 7.458 displays the available width of the user's screen to the page.
Listing 7.458 Accessing the availWidth Property of the screen Object
<script language="JavaScript1.2"> <!-- Hide document.write("The available width of this user's screen is <b>"); document.write(screen.availWidth + '</b> pixels'); // End hide ---> </script> |
Get Pure JavaScript now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.