JavaScript  -  Screen Height

Option 1.   Save this script in the <head> of your html document

<script type="text/javascript">
var scrH1 = screen.height;
</script>

and use this script in the <body>

<script type="text/javascript">
<!--
document.write(""+scrH1+"px");
//-->
</script>

Screen Height - Displays:

 

Option 2.   Save this script in your js folder

Save the following script as screenheight.js

<!--
var scrH2 = screen.height;
document.write(""+scrH2+"px");
// or
// document.write(""+screen.height+"px");
// without variable
//-->

and refer to it in the <body> of your html document

<script src="/js/screenheight.js" type="text/javascript"></script>

Screen Height - Displays:

 

Option 3.   Embed this script in the <body> of your html document

<script type="text/javascript">
<!--
var scrH3 = screen.height;
document.write("Screen Height is "+scrH3+"px");
// or
// document.write("Screen Height is "+screen.height+"px");
// without variable
//-->
</script>

Screen Height - Displays: