Posted By

rwczippy on 10/09/09


Tagged

javascript width DOM height dimensions


Versions (?)

JS screen & browser dimensions


 / Published in: JavaScript
 

pretty basic; dimensions of screen and browser display window

  1. <script type="text/javascript" language="JavaScript">
  2. document.write("screen width = " + screen.width + "px.<br>");
  3. document.write("screen height = " + screen.height + "px.<br>");
  4. document.write("browser width = " + document.documentElement.clientWidth + "px.<br>");
  5. //document.write("browser width is " + document.body.clientWidth + "px.<br>");
  6. document.write("browser height = " + document.documentElement.clientHeight + "px.<br>");
  7. //document.write("browser height is " + document.body.clientHeight + "px.<br>");
  8. </script>

Report this snippet  

You need to login to post a comment.