JavaScript
Clocks Equalizer Text in the Form Background Color Goodbye Pop-up MultiLink Window's Size MultiLink-II DHTML
Russian | Main Page
Useful links:
|
<html>
<head>
<title>www.redmount.com - JavaScript - Window's Size</title>
<script language=javascript>
<!--
N=window.navigator.appName.substring(0,8);
function init()
{
dd=document;
ww=window;
if(document.w_h.winframe.checked)
{
dd=parent.document;
ww=parent.window;
}
if(N=="Microsof"){w=dd.body.clientWidth;h=document.body.clientHeight;}
if(N=="Netscape"){w=ww.innerWidth;h=window.innerHeight;}
document.forms[0].elements[0].value=w;
document.forms[0].elements[1].value=h;
}
// -->
</script>
</head>
<body onload=init() bgcolor="White" leftmargin=30 marginwidth=30><br>
<form name=w_h>
<b>Width:</b> <input type=text name=w size=10 maxlength=10>
<b>Height:</b> <input type=text name=h size=10 maxlength=10>
<input type=checkbox name=winframe onClick=init()>
(Window/Frame)
</form>
</body>
</html>