screen.width : Screen Object « Screen « JavaScript Tutorial






The width property gets the width of the user's screen in pixels.

<html>
    <script language="JavaScript1.2">
    <!--
    document.write("The width of this user's screen is <b>");

    document.write(screen.width  + '</b> pixels');
    -->
    </script>
</html>








18.1.Screen Object
18.1.1.screen
18.1.2.screen.availHeight
18.1.3.screen.availLeft
18.1.4.screen.availTop
18.1.5.screen.availWidth
18.1.6.screen.colorDepth
18.1.7.screen.height
18.1.8.Screen.pixelDepth
18.1.9.screen.width