index.html
---------------------------------------------
<html>
<head>
<title>My FrameSet</title>
<meta http-equiv="Content-type" content="text/html; charset=GB2312">
<meta http-equiv="content-Style-Type" content="text/css">
</head>
<frameset rows="10%,*">
<frame id="top" src=top.html scrolling=no>
<frameset id="main" cols="20%,*" framespacing="0" frameborder="1">
<frame src="webform1.aspx" name="frmLeft" Scrolling="auto">
<frame src="webform2.aspx" name="frmMain" Scrolling="No">
</frameset>
</frameset>
</html>
top.html
---------------------------------------------------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title></title>
<script language=javascript>
var bFlag = true;
function adjust() {
if(bFlag)
window.parent.frames["main"].setAttribute("cols","*,100%");
else
window.parent.frames["main"].setAttribute("cols","20%,80%");
bFlag = !bFlag;
}
</script>
</head>
<body bgcolor=#cccccc>
<table>
<tr>
<td>
<input type=button value="Adjust frame" οnclick="adjust()" style="width:100px;height:30px">
</td>
</tr>
</table>
</body>
</html>