框架画面
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/style.css">
<title>test</title>
</head>
<frameset rows="100,*">
<frame src="F01_top_frame.html" name="top" id="top" frameborder=0>
<frameset cols="180,20,*" name="leftmenu1" id="leftmenu1">
<frame src="a.html" name="leftmenu" id="leftmenu" frameborder=0>
<frame src="b.html" name="side_frame" id="side_frame" frameborder=0>
<frame src="c.html" name="main_frame" id="main_frame" frameborder=0>
</frameset>
<noframes>
</noframes>
</frameset>
</html>
b.html<html>
<head>
<title>tst</title>
<script language="JavaScript">
var frameFlag="Open";
<!--
function frame_Close(){ if (switchPoint.innerText==3){
switchPoint.innerText=4;
switchTd.title="";
}
else{
switchPoint.innerText=3;
switchTd.title="";
} if(frameFlag=="Open"){
top.leftmenu.cols = "10,25,*";
frameFlag="Close";
}else{
top.leftmenu.cols ="180,25,*";
frameFlag="Open";
}
}
-->
</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td id="switchTd" title="ttt" onClick="frame_Close();" colSpan="" rowSpan="">
<span class="STYLE2" id="switchPoint">3</span> </td>
</tr>
</table>
</body>
</html>
现在点击switchPoint触发后,frame没有调整,也没有错误信息,大家帮我看看
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/style.css">
<title>test</title>
</head>
<frameset rows="100,*">
<frame src="F01_top_frame.html" name="top" id="top" frameborder=0>
<frameset cols="180,20,*" name="leftmenu1" id="leftmenu1">
<frame src="a.html" name="leftmenu" id="leftmenu" frameborder=0>
<frame src="b.html" name="side_frame" id="side_frame" frameborder=0>
<frame src="c.html" name="main_frame" id="main_frame" frameborder=0>
</frameset>
<noframes>
</noframes>
</frameset>
</html>
b.html<html>
<head>
<title>tst</title>
<script language="JavaScript">
var frameFlag="Open";
<!--
function frame_Close(){ if (switchPoint.innerText==3){
switchPoint.innerText=4;
switchTd.title="";
}
else{
switchPoint.innerText=3;
switchTd.title="";
} if(frameFlag=="Open"){
top.leftmenu.cols = "10,25,*";
frameFlag="Close";
}else{
top.leftmenu.cols ="180,25,*";
frameFlag="Open";
}
}
-->
</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td id="switchTd" title="ttt" onClick="frame_Close();" colSpan="" rowSpan="">
<span class="STYLE2" id="switchPoint">3</span> </td>
</tr>
</table>
</body>
</html>
现在点击switchPoint触发后,frame没有调整,也没有错误信息,大家帮我看看
你要调整下边的最左边的窗口的大小,就要改变当前框架窗口的父框架
if(frameFlag=="Open"){
top.leftmenu1.cols = "10,25,*";
frameFlag="Close";
}else{
top.leftmenu1.cols ="180,25,*";
frameFlag="Open";
}