<form name="form1" method="post" action="">
<input type="button" name="Submit1" value="按钮1" onClick="funSub(1)">
<input type="button" name="Submit2" value="按钮2" onClick="funSub(2)">
</form>
<script language="javascript">
function funSub(key)
{
if(key==1)
{
form1.action="action1.asp";
form1.submit();
}
else if(key==2)
{
form1.action="action2.asp";
form1.submit();
}
}
</script>
时间: 2024-10-18 02:47:07