怎样让一个提交按钮失效?
提交按钮将所数据存入数据库中,然后按钮失效。请高手看一下帮忙。以下是exam.asp部分代码:
<form method="POST" action="danxscore.asp" name="danxscoreform" >
<table border="0" cellspacing="0" bordercolor="#111111" width="100%" >
<tr>
<td width="100%" height="25"><b><font size="3" color="#000080">一、单项选择题(每题<%=session("singleper")%>分,共<%=session("singlenumber")%>题)
<%
set rs1=server.createobject("adodb.recordset")
sql1="select * from ksst where studentkaohao='"&session("studentkaohao")&"'"
rs1.open sql1,conn,1,1
j=1
for i=1 to len(rs1("strid1")) step 4
dx=(mid (rs1("strid1"),i,3))
set rs=server.createobject("adodb.recordset")
sql="select * from question where id="&clng(dx)
rs.open sql,conn,3,2
'显示题目
%>
</font></b></td>
</tr>
</table>
<table border="0" cellspacing="1" style="border-collapse: collapse" bordercolor="#C0C0C0" width="100%" cellpadding="0">
<tr>
<td width="100%" bgcolor="#EFEFEF" height="20"> <%=j%>、<%=rs("question")%></b></td>
</tr>
<%
if rs("A")<>"" then
%>
<tr>
<td width="100%"> <input type="radio" name="NO<%=rs("id")%>" value="A">A、<%=rs("A")%></td>
</tr>
<%
end if
if rs("B")<>"" then
%>
<tr>
<td width="100%"> <input type="radio" name="NO<%=rs("id")%>" value="B">B、<%=rs("B")%></td>
</tr>
<%
end if
if rs("C")<>"" then
%>
<tr>
<td width="100%"> <input type="radio" name="NO<%=rs("id")%>" value="C">C、<%=rs("C")%></td>
</tr>
<%
end if
if rs("D")<>"" then
%>
<tr>
<td width="100%"> <input type="radio" name="NO<%=rs("id")%>" value="D">D、<%=rs("D")%></td>
</tr>
<%
end if
%>
</table>
<%
j=j+1
rs.update
next
rs.close
set rs=nothing
%>
<tr>
<td width="100%"><p align=right><input type="submit" value=" 提 交 " name="danxadd" ></p>
</td>
</tr>
以下是danxscore.asp代码
<!--#include file="connect.asp"-->
<%
'读取当前科目考试信息
studentdanwei=session("studentdanwei")
studentkaohao=session("studentkaohao")
subjectname=session("selectsubjectname")
studentname=session("studentname")
studentpassword=session("studentpassword")
singlenumber=session("singlenumber")
singleper=session("singleper")
multinumber=session("multinumber")
multiper=session("multiper")
pdnumber=session("pdnumber")
pdper=session("pdper")
endtime=now()
score=0
'计算单选题得
set rs1=server.createobject("adodb.recordset")
sql1="select * from ksst where studentkaohao='"&session("studentkaohao")&"'"
rs1.open sql1,conn,1,1
for i=1 to len(rs1("strid1")) step 4
dx=(mid (rs1("strid1"),i,3))
set rs=server.createobject("adodb.recordset")
sql="select * from question where id="&clng(dx)
rs.open sql,conn,3,2
result=request.form("no"&dx)
if not isempty(result) then
sql="select * from question where id="& clng(dx)
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,3,2
if result=rs("answer") then
score=score+cint(singleper)
end if
rs.close
set rs=nothing
end if
next
rs1.close
set rs1=nothing
sql="select * from score where studentname='"&session("studentname")&"' and studentkaohao='"&session("studentkaohao")&"' and studentpassword='"&session("studentpassword")&"'"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,3,2
rs("studentdanwei")=studentdanwei
rs("endtime")=endtime
rs("danxscore")=score
rs("studentkaohao")=studentkaohao
rs.update
rs.close
set rs=nothing
call endConnection()
Response.Write ("<script language='vbscript'>" & vbCrLf)
Response.Write ("alert " & Chr(34) & "单选题答案保存成功,请继续答题!" & Chr(34) & vbCrLf)
Response.Write ("location.href=" & Chr(34) & "examine.asp?did=" &did &"&cid=" &cid & Chr(34) & vbCrLf)
Response.Write ("</script>")
%>
保存成功后,要回到exam.asp继续操作多选和判断, 如何使提交按钮,提交数据回到exam.asp以后失效。