📄 oldtest.asp
字号:
<!-- #include file="Include/conn.asp" -->
<!-- #include file="Include/Stu_CHK.asp" -->
<!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=gb2312" />
<title></title>
<link href="Images/main.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body {
margin-left: 30px;
}
-->
</style></head>
<body>
<script laugnage="javascript">
var sum=2700;
var str;
function cDate(oSum)
{
var min=Math.floor(oSum/60);
if(min<1)
{min==0}
var sec=oSum%60;
str=" 考试过程中,请不要刷新这个页面,否则将退出考试,现在距考试结束还有:"+min+"分"+sec+"秒,时间到将自动交卷 ";
return str;
}
function submitForm()
{
sum=sum-1;
cDate(sum);
document.getElementById("inp1").value=str;
top.topFrame.d.innerHTML=str;
if(sum==0)
{
clearInterval(newstimer);
alert("时间已到,按确定后交卷!");
document.getElementById("sm").click();
}
}
var newstimer=setInterval("submitForm()",1000)
</script>
<form name="form1" action="Result.asp" method="post">
<div align="center">
<input type="text" id="inp1" value="" maxlength="100"
style="color:#FF0000; font-size:16px; font-weight:bold; width:900px; text-align:center">
<br /> <br />
</div>
<%
Randomize
intRandomNumber = Int(1000 * Rnd) + 100
Sql="Select top 100 * From Papers where t='"&Session("type")&"' order BY Rnd("& (-1 * intRandomNumber) &"* id)"
Set rs=conn.Execute(SQL)
i=0
do while not rs.eof
i=i+1
%>
<div id="div<%=i%>" name="div<%=i%>" style="color:" align="left">
<b>第<%=i%>题(试题编号<%=rs("id")%>):</b><br />
<%=rs("que")%><br />
<%
if rs("type")=1 then
%>
请选择:<input type="radio" id="a<%=i%>" name="a<%=i%>" value="A" />A <input type="radio" id="a<%=i%>" name="a<%=i%>" value="B" />B <input type="radio" id="a<%=i%>" name="a<%=i%>" value="C" />C
<%else%>
请判断:<input type="radio" id="a<%=i%>" name="a<%=i%>" value="对" />对 <input type="radio" id="a<%=i%>" name="a<%=i%>" value="错" />错
<%end if%>
<input name="t<%=i%>" type="hidden" id="t<%=i%>" value="<%=rs("id")%>" />
<hr size="1px" width="80%">
</div>
<%
rs.MoveNext
Loop
Set rs=Nothing
%>
<input name="sm" type="submit" id="sm" onclick="res();" value=" 现 在 交 卷 " style="height:50px; width:150px"/>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -