可以实现在同一页面里的用多按钮进行提交吗?
来源:asp之家 时间:2009-11-01 18:04:00
newstudent.asp
<script LANGUAGE=″vbscript″ RUNAT=″Server″>
</script>
<%if Request.Form(″cmdback″)=″返回″ then
Response.Redirect ″showstudent.asp″
end if%>
<html>
<head>
<meta http-equiv=″Content-Type″ content=″text/html; charset=gb_2312-80″>
<meta name=″VI60_defaultClientScript″ content=″JavaScript″>
<meta name=″GENERATOR″ content=″Microsoft FrontPage 3.0″>
<title>春风精彩之培训班页面</title>
<%if Request.QueryString(″idv″)<>″″ and Request.ServerVariables(″request_method″)=″GET″ then
' 如果是其它页面带参数调用此页面则为真
end if
if Request.ServerVariables(″request_method″)=″POST″ then
' 如果是此页面执行提交操作则为真
if Request.Form(″cmdupdate″)=″更改″
then
' 如果是点击cmdupdate按钮则为真
end if
if Request.Form(″cmdnew″)=″新学号″
then
' 如果是点击cmdnew按钮则为真
end if
if Request.Form(″cmdinsert″)=″添加″
then
' 如果是点击cmdinsert按钮则为真
end if
end if%>
<%cn.close%>
</script>
</head>
<body background=″images/backgrnd.jpg″>
<form method=″post″ name=″frmedit″ LANGUAGE=″javascript″
onsubmit=″return forminput_onsubmit()″>
<div align=″center″><center><h5>
<input type=″submit″ name=″cmdupdate″ value=″更改″>
<input type=″submit″ name=″cmdnew″ value=″新学号″>
<input type=″submit″ name=″cmdinsert″ value=″添加″>
<input type=″button″ name=″cmdback″ value=″返回″ onclick=″javascript:window.opener.focus()″>
</h5>
</center>
</div>
</form>
</body>
</html>