Home > DeveloperSection > Forums > get height and width of screen
nithersh ankugan
nithersh ankugan

Total Post:2

Points:14
Posted on    February-12-2013 1:26 AM

 JavaScript JavaScript 
Ratings:


 1 Reply(s)
 830  View(s)
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



AVADHESH PATEL

Total Post:604

Points:4228
Posted on    February-12-2013 8:45 AM

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>

Don't want to miss updates? Please click the below button!

Follow MindStick