GET HEIGHT AND WIDTH OF SCREEN

nithersh ankugan

Total Post:2

Points:14
Posted by  nithersh ankugan
 1158  View(s)
Ratings:
Rate this:

Hi Everyone!

I want to set div width and height according screen resolution in html. How to get screen width and height using JavaScript.

Thanks in advance

  1. AVADHESH PATEL

    Post:604

    Points:4228
    Re: get height and width of screen

    Hi Nithersh!


    Used JavaScript for getting width and height of screen resolution. 

     <script> 
      document.write("Total Width: " + screen.width); 
      document.write("Screen Height: " + screen.height); 
    </script>

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!