<%@ Page Language="C#" AutoEventWireup="true" CodeFile="test.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<% @ Import Namespace="System.Data.SqlClient" %>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>在线考试-选择题</title>
<script language="javascript" type="text/javascript">
<!--
// -->
</script>
</head>
<body style="text-align: left">
<table>
<tr>
<td>
<img src="images/test.jpg">
</td>
</tr>
</table>
<script language="javascript">
if (navigator.appName.indexOf("Internet Explorer") != -1)
document.onmousedown = noSourceExplorer;
document.onkeydown = noSourceExplorer;
function noSourceExplorer()
{
if (event.button == 2 | event.button == 3 || (event.keyCode==116))
{
alert("考试中禁止刷新!");
}
}
</script>
<form name=forms action=result.aspx method=post><span style="COLOR: #0000FF">考试时间:</span> <input size=8 value=0时0分0秒 name=input1>
<font color="#0000FF">
<script language=javascript>
var sec=0;var min=0;var hou=0;flag=0;idt=window.setTimeout("update();",1000);
function update()
{
if (min==49 && sec==59) {alert("还剩10分钟,请抓紧时间答卷!");}
if (min==60) {alert("考试时间结束!");form1.submit();}
sec++;
if(sec==60){sec=0;min+=1;}
if(min==60){min=0;hou+=1;}
if ((min > 0) && (flag == 0)) { flag = 1; }
document.forms.input1.value=hou+"时"+min+"分"+sec+"秒";
idt=window.setTimeout("update();",1000);
}
</script>
考试中请勿刷新页面!
</font>
</form>
<form id="form1" action="result.aspx" method="post" runat="server">
<asp:Panel ID="Panel1" runat="server" Height="459px" Width="819px">
</asp:Panel>
</form>
</body>
</html>