📄 time.html
字号:
<!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>
</head>
<body>
<script language="javascript">
setTimeout("check()",3603000);
function check()
{
if(form.usetime.value=="考试结束")
this.form.submit.click();
{
alert("考试结束!已选题目将自动提交");
}
}
</script>
</head>
<body bgcolor="#E8F3FF">
<center><h2>鼓楼区办公自动化系统应用考核试卷</h2></center>
<script language="vbscript">
sec=00
min=0
hou=1
SetTimeOut "SpareTime()",1000
sub SpareTime()
if sec=0 and min=0 and hou=0 then
form.usetime.value="考试结束"
else
sec=sec-1
if sec=-1 then
sec=59
min=min-1
end if
if min=-1 then
min=59
hou=hou-1
end if
if len(hou)<2 then
hou="0"&hou
end if
if len(min)<2 then
min="0"&min
end if
if len(sec)<2 then
sec="0"&sec
elseif len(sec)<1 then
sec=00
end if
form.usetime.value=hou&":"&min&":"&sec
SetTimeOut "SpareTime()",1000
end if
end sub
</script>
<form name="form" method="post" action="score.jsp">
<h3><center>完成试卷剩余时间:<input type="text" name="usetime" size="8" style="border:0pt"> </center>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -