JavaScript  -  Screen Available Width

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

<script type="text/javascript">
var scraW1 = screen.availWidth;
</script>

and use this script in the <body>

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

Screen Available Width - Displays:

 

Option 2.   Save this script in your js folder

Save the following script as screenavwidth.js

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

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

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

Screen Available Width - Displays:

 

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

<script type="text/javascript">
<!--
var scraW3 = screen.availWidth;
document.write("Screen Available Width is "+scraW3+"px");
// or
// document.write("Screen Available Width is "+screen.availWidth+"px");
// without variable
//-->
</script>

Screen Available Width - Displays: