test.asp
来自「基于ASP的网上考试系统源码」· ASP 代码 · 共 31 行
ASP
31 行
<%
'session.timeout=10'session对象的超时值
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("examination.mdb")
Set rs = Server.CreateObject("ADODB.Recordset")
%>
<%rs.open " select * from 数字逻辑 order by 题目序号",conn,2,2
while not rs.eof
%>
<%=rs("题目序号")%>、<%=rs("题目")%>(<%=rs("本题分数")%>)<%=rs("题目类型")%><br>
<%if rs("题目类型")=1 then
for n=1 to 4 %>
<input type="radio" name="s"<%=n%>>
<%response.write "选择项"&n&":"&rs("选择项"&n)&"<br>"
next
elseif rs("题目类型")=2 then
for n=1 to 4 %>
<input type="checkbox" name="s"<%=n%>>
<%response.write "选择项"&n&":"&rs("选择项"&n)&"<br>"
next
elseif rs("题目类型")=3 then%>
<input type="text">
<% end if
rs.movenext
wend
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?