<input type=button value="提交" onclick="sh1()">
<input type=button value="提交" onclick="sh2()">
这种情传统做法就是提交后判断调用
比如
把下面的代码保存为abc.asp执行
[CODE]<html>
<head>
<title>提交测试</title>
<%
Dim tStr
Sub sh1()
tStr="执行了sh1"
End Sub
Sub sh2()
tStr="执行了sh2"
End Sub
Select Case Request.Form("SubName")
Case "sh1"
Call sh1()
Case "sh2"
Call sh2()
End Select
%>
<script language="javascript">
function Page_Submit(SubName)
{
SubForm.action="abc.asp?SubName="+SubName;
SubForm.submit();
}
</script>
</head>
<body>
<form name="SubForm" action="abc.asp" method="post" >
<input type="button" name="Submit" onClick="Page_Submit('sh1');" value="提交执行sh1">
<input type="button" name="Submit" onClick="Page_Submit('sh2');" value="提交执行sh2">
<%
Response.Write tStr
%>
</form>
</body>
</html>[/CODE]