提交表单打开小窗口显示结果的代码?

来源:百度知道 编辑:UC知道 时间:2024/06/07 13:03:39
弄的一个查询成绩的网页,想让输入考号时,点击提交,转到另一网页,这个网页在一个自定义的小窗口中打开,窗口大小不可改变,没有菜单和地址栏的那种.谢谢,部分代码如下:
<FORM name=config onsubmit="return check_input();" action="?action=1" method=post target=_blank>
<TBODY>
<TR>
<TD height=5>
<table border="0" width="105%" cellspacing="0" cellpadding="0" id="table4">
<tr>
<td align="justify">
<font color="#0066CC">
请输入考号:</font>
<input id="idc" type="text" name="idc" size="25"> <input type="submit" value="提交" name="B1"></td>
</tr>
</table></TD></TR></FORM>

在"提交"按钮中 通过onClick调用下面这个函数,就可以实现希望了.(假定提交后要执行score.asp,其中通过request("getidc")来获得idc的值.原表单中的onsummit及action全部去掉)
<script language="javascript">
function sbmt(){
if (check_input()){
window.open ("score.asp?getidc="+document.config.idc.value, "newwindow", "height=100, width=400, top=0, left=0,toolbar=no, menubar=no");
}
}</script>