⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 testpaper1.aspx

📁 本系统实现了网上考试的目的
💻 ASPX
字号:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TestPaper1.aspx.cs" Inherits="TestPaper1" %>

<!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 runat="server">
<script language="javascript">  
             function  f1()  
             {  
                     document.all(  "div1").style.display  =  '';  
                     document.all(  "div2").style.display  =  'none';
                     document.all(  "div3").style.display  =  'none';
                     document.all(  "div4").style.display  =  'none';

             }  
             function  f2()  
             {  
                     document.all(  "div1").style.display  =  'none';  
                     document.all(  "div2").style.display  =  ''; 
                     document.all(  "div3").style.display  =  'none';
                     document.all(  "div4").style.display  =  'none';

             }
             function  f3()
             {  
                     document.all(  "div1").style.display  =  'none';  
                     document.all(  "div2").style.display  =  'none';
                     document.all(  "div3").style.display  =  '';
                     document.all(  "div4").style.display  =  'none';

                 
              }
              function f4()
              {
                     document.all(  "div1").style.display  =  'none';  
                     document.all(  "div2").style.display  =  'none';
                     document.all(  "div3").style.display  =  'none';
                     document.all(  "div4").style.display  =  '';
                  
              }
                           <!-- 
var maxtime1; 
if(window.name==''){ 
maxtime1 = 120*60; 
}else{ 
maxtime1 = window.name; 
} 
function CountDown1(){ 
if(maxtime1>=0){ 
minutes1 = Math.floor(maxtime1/60); 
seconds1 = Math.floor(maxtime1%60); 
msg1 = "距离考试结束还有:"+minutes1+"分"+seconds1+"秒"; 
document.all["timer1"].innerHTML = msg1; 
if(maxtime1 == 5*60) alert('注意,还有5分钟!'); 
--maxtime1; 
window.name = maxtime1; 
} 
else{ 
   clearTimeout(timer1); 
   document.getElementById('Ibtn_submit').click();  
} 
} 
timer1 = setInterval("CountDown1()",1000); 


//--> 
<!-- 
var maxtime; 
if(window.name==''){ 
maxtime = 5*60; 
}else{ 
maxtime = window.name; 
} 
function CountDown(){ 
if(maxtime>=0){ 
minutes = Math.floor(maxtime/60); 
seconds = Math.floor(maxtime%60); 
msg = "距离自动保存还有:"+minutes+"分"+seconds+"秒"; 
document.all["timer"].innerHTML = msg; 
--maxtime; 
window.name = maxtime; 
} 
else{ 
   clearTimeout(timer);   
   document.getElementById('Ibtn_save').click();
   window.name=10; 
} 
} 
timer = setInterval("CountDown()",1000); 


//--> 
              <!-- Hide
var timerID = null
var timerRunning = false
function MakeArray(size) {
    this.length = size;
    for(var i = 1; i <= size; i++)
      {
        this[i] = "";
      }
  return this;
}
function stopclock (){
    if(timerRunning)
    clearTimeout(timerID);
    timerRunning = false
}
function showtime (){
  var now = new Date();
  var year = now.getYear();
  var month = now.getMonth() + 1;
  var date = now.getDate();
  var hours = now.getHours();
  var minutes = now.getMinutes();
  var seconds = now.getSeconds();
  var day = now.getDay();
  Day = new MakeArray(7);
  Day[0]="星期天";
  Day[1]="星期一";
  Day[2]="星期二";
  Day[3]="星期三";
  Day[4]="星期四";
  Day[5]="星期五";
  Day[6]="星期六";
  var timeValue = "";
  timeValue += year + "年";
  timeValue += ((month < 10) ? "0" : "") + month + "月";
  timeValue += date + "日  ";
  timeValue += (Day[day]) + "  ";
  timeValue += ((hours <= 12) ? hours : hours - 12);
  timeValue += ((minutes < 10) ? ":0" : ":") + minutes;
  timeValue += ((seconds < 10) ? ":0" : ":") + seconds;
  document.all.clock.innerText = timeValue;
  timerID = setTimeout("showtime()",1000);
  timerRunning = true
}
function startclock () {
  stopclock();
  showtime()
}

//-->
		</script>
    <title>考生界面(断线)</title>
</head>
<body style="font-size: 12pt">
    <form id="form1" runat="server">
    <div>
        &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<table border="0" width="1000">
            <tr>
                <td background="images/logo.jpg" style="height: 185px" width="1000">
                    &nbsp;</td>
            </tr>
            <tr>
                <td align="center" style="height: 300px">
                    <table id="TABLE1" align="center" bgcolor="#99ff99" border="1" bordercolor="#0066cc"
                        language="javascript" onclick="return TABLE1_onclick()" width="1000">
                        <tr bgcolor="#ffff33">
                            <td id="clock" background="images/10.jpg" style="width: 307px; height: 12px" valign="bottom">
                            </td>
                            <td background="images/10.jpg" style="height: 12px" valign="bottom"><p align="right">欢迎使用网上考试系统&nbsp;</p>
                            </td>
                        </tr>
                        <tr bgcolor="#ffff33">
                            <td style="width: 564px; height: 22px" bgcolor="#ffffff">
                                <font face="宋体"><a name="top"></a>考生学号:
                                    <asp:Label ID="lbl_stuId" runat="server" ForeColor="Red"></asp:Label></font></td>
                            <td style="color: #000000; height: 22px" bgcolor="#ffffff">
                                <font face="宋体"><span style="color: #ff0033">考生姓名: </span>
                                    <asp:Label ID="lbl_stuName" runat="server" ForeColor="Red"></asp:Label></font></td>
                        </tr>
                        <tr bgcolor="#99ccff" style="color: #000000; font-family: Times New Roman">
                            <td align="center" colspan="2" style="height: 62px" bgcolor="#ffffff">
                                <font face="宋体" size="30">《<asp:Label ID="lbl_courseName" runat="server" Font-Bold="True"
                                    ForeColor="Black" Height="49px"></asp:Label>》考试试题</font></td>
                        </tr>
                        <tr>
                            <td colspan="2" bgcolor="#ffffff">
                                <font color="#ff0033" face="宋体"><span style="color: #ff0000">考试过程中请不要刷新!试题不会改变!但是选择结果会清空!</span></font><div id="timer" style="color:red">
        &nbsp;</div><div id="timer1" style="color:red">&nbsp;</div></td>
                        </tr>
                        <tr bgcolor="#ffcc33" style="color: #000000; font-family: Times New Roman">
                            <td style="width: 564px; height: 25px" bgcolor="#ffffff">
                                <font face="宋体">考试题为70道选择题,1篇完型填空,1篇阅读理解(分四页)</font></td>
                            <td style="height: 25px" bgcolor="#ffffff">
                                <asp:ImageButton ID="Ibtn_submit" runat="server" ImageUrl="images\btn_submit.gif"
                                    OnClick="Ibtn_submit_Click" ToolTip="交卷后不可再考试!" />
                                <asp:ImageButton ID="Ibtn_save" runat="server" Height="25px" ImageUrl="~/images/btn_save_1.gif"
                                    OnClick="Ibtn_save_Click" Width="69px" /></td>
                        </tr>
                        <tr style="font-family: Times New Roman">
                            <td align="center" colspan="2" style="height: 29px; text-align: center" bgcolor="#ffffff">
                                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                                &nbsp; &nbsp;<input name="bt1" onclick="f1()" type="button" value="第1页" />
                                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;
                                <input name="bt2" onclick="f2()" type="button" value="第2页" />
                                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;
                                <input id="bt3" onclick="f3()" type="button" value="第3页" />
                                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;
                                <input id="bt4" onclick="f4()" type="button" value="第4页" />
                            </td>
                        </tr>
                        <tr style="font-family: Times New Roman">
                            <td colspan="2" style="height: 746px; text-align: left" bgcolor="#ffffff">
                                <div id="div2" style="display: none">
                                    <asp:Panel ID="Panel2" runat="server" Style="text-align: left">
                                        <font face="宋体"></font>
                                    </asp:Panel>
                                </div>
                                <div id="div1">
                                    <font face="宋体"></font>
                                    <asp:Panel ID="Panel1" runat="server">
                                        <span style="font-family: Times New Roman"><font face="宋体">一.选择题(共70道,一题一分,共70分)</font>
                                        </span>
                                    </asp:Panel>
                                </div>
                                <div id="div3" style="display: none">
                                    <font face="宋体"></font>
                                    <asp:Panel ID="Panel3" runat="server">
                                        <font face="宋体"><span style="font-family: Times New Roman">二.完型填空(共20个题,一题</span>一分,共20分)</font>
                                    </asp:Panel>
                                </div>
                                <div id="div4" style="display: none">
                                    <asp:Panel ID="Panel4" runat="server">
                                        <font face="宋体">三.阅读题(共5个题,一题二分,共10分)</font>
                                    </asp:Panel>
                                </div>
                            </td>
                        </tr>
                        <tr style="font-family: Times New Roman">
                            <td align="center" colspan="2" style="height: 29px" bgcolor="#ffffff">
                                <a href="#top">返回顶端</a> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<input
                                    name="bt1" onclick="f1()" type="button" value="第1页" />
                                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;
                                <input name="bt2" onclick="f2()" type="button" value="第2页" />
                                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;
                                <input id="Button1" onclick="f3()" type="button" value="第3页" />
                                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;
                                <input id="Button2" onclick="f4()" type="button" value="第4页" />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr style="font-family: Times New Roman">
                <td height="200">
                    <font face="宋体"></font>
                </td>
            </tr>
        </table>
        &nbsp;
    
    </div>
    </form>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -