
|
 |

Determine the width of the browser windowThis javascript gives you the width of your browser window, useful if your design depends on the size of the screen. Note that Netscape & Internet Explorer both use different variable names.
<script language=javascript>
if(navigator.appName == "Netscape")
{
windowwidth = window.innerWidth;
}
else if(navigator.appName == "Microsoft Internet Explorer")
{
windowwidth = document.body.clientWidth;
}
</script>
|
Comments
Comment by matt on 2005-12-05
is there a way to detect height of the browser window thanks?
|
|
|