一个表单有2个submit按钮,怎么给每个按钮设置动作?

来源:百度知道 编辑:UC知道 时间:2024/07/15 02:17:12
看看我的源码,有点乱
<form id="form1" name="form1" method="post" action="PB.asp">
<input type="submit" name="btnSubmit" id="btnSubmit" value="处理此条记录" />
<input type="submit" name="btnSubmit" id="btnSubmit" value="暂不处理" />
</form>
......
<%
if Request.Form("btnSubmit")="处理此条记录" then
for j=1 to count1
if request.form("asp" & j & "")="on" then
response.write("<script language='javascript'>")
response.write("window.open='PB.asp';")
response.write("</script>")

session("name2")=Request.Form("tt1" & j)
exit for
end if

next
else
if Request.Form("btnSubmit")="暂不处理" then
for j=1 to count1

示例

XML/HTML code

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style>
.tj{border:none;float:left;background:url(http://d.lanrentuku.com/down/png/0904/2.0btn/2-0btn_08.png) -2px -94px no-repeat;width:250px;height:58px; text-align:center; font-size:18px;line-height:58px;}
</style>
<script src="