• Archives

  • Knowing the screen resolution of the client window

    By admin | May 20, 2008

    Sometimes or many times we need to know the screen resolution of the client window to create webpages according to there resolution !!!

    Syntax:

    <html>
    <body>
    <script type=”text/javascript”>
    document.write(“Screen resolution: “);
    document.write(screen.width + “*” + screen.height);
    document.write(“<br />”);
    document.write(“Available view area: “);
    document.write(screen.availWidth + “*” + screen.availHeight);
    </script>
    </body>
    </html>

    so it is that easy

    thanks

    krates

    Topics: Javascript | Comments Off on Knowing the screen resolution of the client window

    Related Links: