做了个聊天对话框,用iframe嵌套格式的,发送是一个单独的文件,名字chatform.asp  显示聊天的页面是一个文件,名字是main.asp  这两个文件被嵌套在一个叫lt.asp的文件里,chatform.asp里有个下拉框,问题是:当选中密谈的的时候,怎样使main.asp消失,切换成0000.asp来处理数据,选中普通的时候再切换回main.asp呢?应该是在下拉框上加java脚本
lt.asp内容如下:
<table width="100%" height="90"  border="0" align="left" cellpadding="0" cellspacing="0">
<tr><td height="49" valign="top"><iframe src="main.asp?act=login&ntime=<%=ntime%>" name='main' marginwidth=0 width="100%" height=164></iframe></td></tr><tr><td height="20" valign="top"><iframe src="chatform.asp?ntime=<%=ntime%>" name="chatform" scrolling="No" marginwidth=0 marginheight=0 width="100%"height=65  noresize></iframe></td></tr></table>
chatform.asp内容如下:
<form name="GroupSendForm"  style="margin:0"method="POST" action="main.asp" target="main" onSubmit="return valid_words()"><table width="100%" align="center" cellpadding="0" cellspacing="0"><tr><td colspan="3" valign="top"><input type="hidden" name="formsubmit" value="发送"><select name="ispublic"  onChange="[color=808000]我觉得这儿要加点什么代码[/color]"><option value="main.asp">普通</option>
                                    <option value="0000.asp">密谈</option>
                                  </select>
                                    <table width="100%" height="1" border="0" cellpadding="0" cellspacing="0">
                                  </table></td>
                              </tr>
                              <tr>
                                <td height="5" valign="middle">
                                    <input type="hidden" name="putwords">
                                    <div align="left"></div></td>
                                <td width="13%" rowspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                                  <tr>
                                    <td height="6"></td>
                                  </tr>
                                  <tr>
                                    <td><input name="imageField" type="image" src="images/tijao.jpg" width="33" height="24" border="0"></td>
                                  </tr>
                                </table></td>
                                <td width="3%" rowspan="2">&nbsp;</td>
                              </tr>
                              <tr>
                                <td valign="middle">&nbsp;
                                  <input name="putwords_temp" type="text" class="unnamed11" style="background-color:#948E94" onKeyDown="return KeyDown();" value="" size="10" maxlength="30">
                                 </td>
                              </tr>
                            </table>
                          </form>