函数是在提交之前进行的验证<form method="POST" action="classmana1.asp" align="center" language="javascript" onsubmit="return test(this);">
<input type="hidden" name="options" value="">
<table border="0" cellpadding="0" cellspacing="0" width="95%" align="center"> <tr>
<td><div align="center"><center><p>类别: <select name="subject" size="1"
style="font-size: 9pt">
.........
<input type="submit" value="新增" name="B3" onclick="form.options.value='new'"></td>
</tr>
</table>
</form>
<input type="hidden" name="options" value="">
<table border="0" cellpadding="0" cellspacing="0" width="95%" align="center"> <tr>
<td><div align="center"><center><p>类别: <select name="subject" size="1"
style="font-size: 9pt">
.........
<input type="submit" value="新增" name="B3" onclick="form.options.value='new'"></td>
</tr>
</table>
</form>
谢谢你
我的QQ号是:165620088
多贴点代码
up!
<FORM METHOD=POST ACTION="" onsubmit=x(this)>
</FORM>
<SCRIPT LANGUAGE="JavaScript">
<!--
function x(obj_form)
{
//obj_form为传来的窗体
obj_form.options.value//表示你下拉选项值
//也可也给options其他属性如:obj_form.options.my_arr_is='xyz'或function(){xxx}
return confirm("将同时删除该专题中的所有内容!是否继续?");用户按确定是,返回真值,程序结束!
}
//-->
</SCRIPT>