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

📄 selectsum.aspx

📁 一个不错的在线考试系统!~~实现了基本的在线考试系统的主要功能
💻 ASPX
字号:
<%@ page language="C#" autoeventwireup="true" inherits="teacher_selectsum, App_Web_rnpj0phz" %>

<!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 >
    <link href="../main.css" rel=stylesheet type="text/css" />
    <style>
    #gvw_select A:hover{font-weight:bolder	}
	#tb_windcate td{
	BORDER-RIGHT: #5e85b1 1px solid;  BORDER-BOTTOM: #5e85b1 1px solid;text-align:left
	}
    </style>
    <script type="text/javascript">
    function getBid(s){
	  return document.getElementById(s);
	}
	function TenString(s){
	  if(s.length>13)
	    return (s.substring(0,11)+"...");
	  return s; 
	}
    function showextrampaper(id)
    {
      var teacher=document.all.teacher.value
      var coursename=getBid("ddl_brocourse").options[getBid("ddl_brocourse").selectedIndex].text      
      var tb =getBid("tb_windcate");
      var v = teacher_selectsum.GetTable(id).value; // 类的名称
      if (v != null){      
	  if(v != null && typeof(v) == "object" && v.Rows != null)
				{	
				    tb.innerText=null;		
					for(var i=0; i<v.Rows.length; i++)
  				{  				    
                           var newRow = tb.insertRow(); //创建新行
                           var newCell1 = newRow.insertCell(); //创建新单元格
                           newCell1.innerText =coursename; //单元格内的内容
                           newCell1.setAttribute("align","center"); //设置位置 
                           newCell1.setAttribute("width","30%");//设置宽度
                           var newCell2 = newRow.insertCell(); //创建新单元格
                           newCell2.innerText =v.Rows[i].time; //单元格内的内容
                           newCell2.setAttribute("align","center"); //设置位置 
                           newCell2.setAttribute("width","11%");
                           var newCell3 = newRow.insertCell(); //创建新单元格
                           newCell3.innerText =TenString(v.Rows[i].name); //单元格内的内容
                           newCell3.setAttribute("align","center"); //设置位置 
                           newCell3.setAttribute("width","35%");
                           var newCell4 = newRow.insertCell(); //创建新单元格
                           newCell4.innerText =v.Rows[i].endtime; //单元格内的内容
                           newCell4.setAttribute("align","center"); //设置位置 
                           newCell4.setAttribute("width","14%");
                           var newCell5 = newRow.insertCell(); //创建新单元格
                           //newCell5.innerHTML ="<a  href='viewtitle.aspx?type=2&&id="+v.Rows[i].num+"' target='_blank'>查看</a>"; //单元格内的内容
                           newCell5.innerHTML ="<a onclick=\"window.open('viewpaper.aspx?id="+teacher+"&&paperID="+v.Rows[i].num+"','','height=588,width=1015,top=0,left=0,location=yes,scrollbars=yes,resizable=yes,menubar=yes,toolbar=yes,status=yes');return false;\" href='#'>查看</a>";
                           newCell5.setAttribute("align","center"); //设置位置  
                           newCell5.setAttribute("width","10%"); 
                           getBid("record").value="此课程的试卷记录如下!"; 				     				
  				}
				}
	   }	
	   else
	   {
	      tb.innerText=null;
	      getBid("record").value="无此课程的试卷记录!";
	   }
	   return;
    }
    function attachXMenu(objid){
	    var tds=objid.getElementsByTagName('td');
	    for(var i=0;i<tds.length;i++){
		    with(tds[i]){
			    onmouseover=function(){
				    with(this){
					    filters[0].apply();
					    style.background='#eefbdb'; //这是鼠标移上去时的背景颜色
					    style.border='1px solid #ffffff'; //边框
					    style.color='black'; //文字颜色
					    filters[0].play();
				    }
			    }
			    onmouseout=function(){
				    with(this){
					    filters[0].apply();
					    style.background='#62b4db'; //这是鼠标离开时的背景颜色
					    style.border='1px solid #62b4db'; //边框
					    style.color='#ffffff'; //文字颜色
					    filters[0].play();
				    }
			    }
		    }
	    }
    }
    function Display(aa,bb)
    {
      if(aa.style.display=="none")
      {
         bb.style.display="none";
         aa.style.display="";
      }
      else
      {
            bb.style.display="none"; 
      }
    }
    </script>
</head>
<body leftmargin=5px rightmargin=10px>
    <form id="selectsum" runat="server">
    <div style="margin-top:5px;border-left:#62b4db 2px solid;margin-right:8px">
    <!--页面头部三个按钮-->
        <div id=head style="width:80%;margin-bottom:0px;height:13px">
            <table class="menu" id="menu_list">
                <tr>
                     <td></td>
                     <td onclick=Display(sel,bro)>试卷成绩查询与统计</td>  
                     <td onclick=Display(bro,sel)>试卷维护与浏览</td>  
                     <td></td>                  
                </tr>
            </table>
            <script>attachXMenu(menu_list)</script>
        </div>
    <!--页面主体-->
         <!--试卷维护与浏览-->
        <fieldset class=fieldset id=bro style="margin-top:0px;width:100%;display:none">
            <div style="width:100%;text-align:center">
                <table style="width:95%;;" cellspacing=0px>
                    <tbody>
                        <tr>
                            <td colspan=2 align=left style="font-weight:bolder;color:MidnightBlue;border:#5e85b1 1px solid;padding-left:30px;height:20px">试卷维护与浏览</td>
                        </tr>
                        <tr>
                             <td style="border:#5e85b1 1px solid;width:20%" align="left">课程名称:</td>
                             <td style="border:#5e85b1 1px solid;width:80%" align="left"><asp:DropDownList ID="ddl_brocourse" runat="server"></asp:DropDownList>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type=text id="record" style="   BORDER-RIGHT: transparent 0px solid; BORDER-TOP:  transparent 0px solid; FONT-SIZE: 12px;BORDER-LEFT:  transparent 0px solid;BORDER-BOTTOM: #1772dd 1px solid;BACKGROUND-COLOR:TRANSPARENT;color:#4A6EB8;width:120px	"value="试卷记录" /></td>
                       </tr> 
                    </tbody>                 
                </table> 
               <div >
                    <div style="width:95%;height:14px;;margin-top:0px;text-align:left;padding-top:0px">
                        <table style="width:98%;color:White;font-size:12px;font-weight:bolder;background-color:#507CD1" cellpadding=0px cellspacing=0px>
                            <tbody>
                                <tr>
                                    <td style="width:30%;text-align:center;border:white 1px solid">课程名称</td>
                                    <td style="width:10%;text-align:center;border:white 1px solid">考时</td>
                                    <td style="width:35%;text-align:center;border:white 1px solid">试卷名称</td>
                                    <td style="width:15%;text-align:center;border:white 1px solid">失效时间</td>
                                    <td style="width:10%;text-align:left;border:white 1px solid">详情</td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div style="width:97%;overflow-y:scroll;height:340px;margin-top:0px;padding-top:0px;padding-left:3px">
                        <table id="tb_windcate" width=95% cellspacing=0px cellpadding=0px style="border:#507CD1 1px solid;font-size:11px"></table>
                    </div>
                </div>        
            </div>
        </fieldset>
        <!--试卷成绩查询与统计-->
        <fieldset class=fieldset id=sel style="margin-top:0px;width:100%;display:block">
            <div style="width:100%">
                <table class=tb>
                    <tr>
                        <td colspan="2" align="center" style="font-weight:bolder;color:MidnightBlue;padding-left:30px">试卷成绩查询与统计</td>
                    </tr>
                    <tr>
                        <td width=20%>课程名称:</td>
                        <td width=80%><asp:DropDownList ID="ddl_selcourse" runat="server" ></asp:DropDownList></td>
                    </tr>
                    <tr>
                        <td colspan=2 rowspan=8 >
                            <div >
                            <!--本想使用Ajax技术来做把查询的结果添加至表中-->
<%--                                <table id="select_answer" class=tb style="width:100%">
                                    <tbody>
                                        <tr>
                                            <td>课程名称</td>
                                            <td>题型</td>
                                            <td>试题内容</td>
                                            <td>难易程度</td>
                                            <td>查看详情</td>
                                        </tr>
                                    </tbody>
                                </table>--%>
                                <div style="width:96%;float:left;height:14px;background-color:#507CD1;margin-top:0px;margin-left:0px">
                                    <table style="width:100%;color:White;font-size:12px;font-weight:bolder;margin-left:0px" cellpadding=0px cellspacing=0px>
                                        <tbody>
                                            <tr>
                                                <td style="width:20%;text-align:center;border:white 1px solid">姓名</td>
                                                <td style="width:20%;text-align:center;border:white 1px solid">考试时间</td>
                                                <td style="width:20%;text-align:center;border:white 1px solid">最后得分</td>
                                                <td style="width:20%;text-align:left;border:white 1px solid">详情</td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </div>
                                <div style="overflow-y:scroll;height:210px;width:100%">
                                <asp:GridView ID="gvw_select" runat="server" AutoGenerateColumns="False" ShowHeader="false" Width=100% PageSize="100" Font-Size="11px" >
                                    <Columns>
                                    </Columns>
                                </asp:GridView>
                                </div>
                            </div>
                        </td>
                    </tr>
                </table>                   
            </div>
        </fieldset>
        <div><input type=hidden id="teacher" value="<%=loginID%>" /> </div>      
     </div>
    </form>
</body>
</html>

⌨️ 快捷键说明

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