JavaScript

How to find screen resolution using javascript?

How to find screen resolution using javascript?, someone asked me to explain?

We can find out the screen resolution by using the property screen.width and screen.height.  The following javascript code will alert the screen resolution.

Example:

<script type="text/javascript">
        var width = screen.width;
        var height = screen.height;
       alert(width + ' x' + height);
    </script>

Post your comments / questions