[求助]一个网页中有两个表单,点击“提交”后如何区分
一个one.asp网页中有两个表单,两个“提交”按钮,点击“提交”后如何区分是哪个表单提交的,下面是程序,想点击上一个“提交”后执行ch1()子程序,点击下一个“提交”后执行ch2()子程序,(这是错误的)我应该如何写才行<body>
<form id="form1" name="form1" method="post" action="one.asp?action=ch1">
<table width="300" border="0" align="center">
<tr>
<td><div align="center">
<label>
<select name="select">
<option value="a">1</option>
<option value="b">2</option>
</select>
</label>
</div></td>
</tr>
<tr>
<td><div align="center">
<label>
<input type="submit" name="Submit" value="提交" />
</label>
</div></td>
</tr>
</table>
</form>
<form id="form2" name="form2" method="post" action="one.asp?action=ch2">
<table width="300" border="0" align="center">
<tr>
<td><div align="center">
<label>
<select name="select2">
<option value="c">3</option>
<option value="d">4</option>
</select>
</label>
</div></td>
</tr>
<tr>
<td><div align="center">
<label>
<input type="submit" name="Submit2" value="提交" />
</label>
</div></td>
</tr>
</table>
</form>
<%
if request("action")="ch1" then
call ch1()
end if
if request("action")="ch2" then
call ch2()
end if
sub ch1()
na=trim(request.Form("select"))
response.Write(na)
end sub
sub ch2()
na=trim(request.Form("select2"))
response.Write(na)
end sub
%>
</body>