c# .net Adsense ADO.NET Linq Viruses/security asp.net MVC JQuery Angular-js Node-js SEO Java C++ SQL API Networking vb.net .Net Css JavaScript Generics c#.Net entity framework HTML Website host Website Construction Guide HTTP tutorial W3C tutorial Web Services JSON Psychology Ionic framework Angular ReactJS Python Computer Android
JavaScript

How to find screen resolution using javascript?

| | JavaScript

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>