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

📄 addextram.aspx

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

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head >
    <title>添加浏览试题</title>
    <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>12)
	    return (s.substring(0,9)+"...");
	  return s; 
	}
    function showextram(id)
    {
      var coursename=getBid("ddl_brocourse").options[getBid("ddl_brocourse").selectedIndex].text      
      var tb =getBid("tb_windcate");
      var v = teacher_addextram.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","left"); //设置位置 
                           newCell1.setAttribute("width","30%");//设置宽度
                           var newCell2 = newRow.insertCell(); //创建新单元格
                           newCell2.innerText =v.Rows[i].subject; //单元格内的内容
                           newCell2.setAttribute("align","left"); //设置位置 
                           newCell2.setAttribute("width","15%");
                           var newCell3 = newRow.insertCell(); //创建新单元格
                           newCell3.innerText =TenString(v.Rows[i].title); //单元格内的内容
                           newCell3.setAttribute("align","left"); //设置位置 
                           newCell3.setAttribute("width","35%");
                           var newCell4 = newRow.insertCell(); //创建新单元格
                           newCell4.innerText =v.Rows[i].hard; //单元格内的内容
                           newCell4.setAttribute("align","left"); //设置位置 
                           newCell4.setAttribute("width","10%");
                           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('viewtitle.aspx?type=2&&id="+v.Rows[i].num+"','','width=470px,height=390px,top=250px,left=250px');return false\" href='#'>查看</a>";
                           newCell5.setAttribute("align","left"); //设置位置  
                           newCell5.setAttribute("width","10%");  				     				
  				}
				}
	   }	
	   else
	   {
	      tb.innerText=null;	
	   }
	   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,cc)
    {
      if(aa.style.display=="none")
      {
         cc.style.display="none";
         bb.style.display="none";
         aa.style.display="";
      }
      else
      {
            bb.style.display="none"; 
            cc.style.display="none";
      }
    }
    function selecttype()
    {
        var s=getBid("select_type")
        if(s.selectedIndex==2)
        {
            getBid("multiradio").style.display="";
            getBid("truefalse").style.display="";
            getBid("multioption").style.display="none";
            getBid("multiselect").style.display="none";
            getBid("tbox_type").value=getBid("select_type").value;
            
        }
        else
        {
            getBid("multiradio").style.display="none";
            getBid("truefalse").style.display="none";
            getBid("multioption").style.display="";
            getBid("multiselect").style.display="";
            getBid("tbox_type").value=getBid("select_type").value;
        }
    }
    function commandcacle()
    {
        getBid("tbox_title").value="";
        getBid("tbox_optionA").value="";
        getBid("tbox_optionB").value="";
        getBid("tbox_optionC").value="";
        getBid("tbox_optionD").value=""; 
        getBid("chb_answer").selected=""; 
        getBid("rab_answer").selected="";   
    }
    </script>
</head>
<body>
    <form id="addextram" runat="server">
    <div style="margin-top:5px;border-left:#62b4db 2px solid;">
    <!--页面头部三个按钮-->
        <div id=head style="width:80%;margin-bottom:0px;height:13px">
            <table class="menu" id="menu_list">
                <tr>
                     <td onclick=Display(sel,bro,add)>试题查询</td>
                     <td onclick="Display(add,sel,bro)">试题添加</td>
                     <td onclick=Display(bro,add,sel)>试题浏览与维护</td>                     
                </tr>
            </table>
            <script>attachXMenu(menu_list)</script>
        </div>
    <!--页面主体-->
    <!--添加试题-->
        <fieldset class=fieldset id=add style="margin-top:0px;width:100%;display:none">
            <div>
                <table class=tb>
                    <tbody>
                        <tr>
                            <td colspan="2" style="font-weight:bolder;color:MidnightBlue;padding-left:30%">试题添加</td>
                        </tr>
                        <tr>
                            <td>课程名称:</td>
                            <td><asp:DropDownList ID="ddl_addcourse" runat="server"></asp:DropDownList></td>
                        </tr>
                        <tr>
                            <td>试题类型:</td>
                            <td>
                                <%--<select ID="select_type" onchange="if(select_type.selectedIndex==2){multiradio.style.display='';truefalse.style.display='';multioption.style.display='none';multiselect.style.display='none';document.getElementById('<%=tbox_type.ClientID %>').innerText=select_type.value;} else {multiradio.style.display='none';truefalse.style.display='none';multioption.style.display='';multiselect.style.display='';document.getElementById('<%=tbox_type.ClientID %>').innerText=select_type.value;}"><option value="1">单选题</option><option value="2">多选题</option><option value="3">判断题</option></select> --%>
                                <select ID="select_type" onchange="selecttype()"><option value="1" selected=selected>单选题</option><option value="2">多选题</option><option value="3">判断题</option></select> 
                                <div style="display:none">
                                    <asp:TextBox ID="tbox_type" runat="server" >1</asp:TextBox>
                                </div>                               
                            </td>                            
                        </tr>
                        <tr>
                            <td >试题难度:</td>
                            <td ><asp:DropDownList ID="ddl_hard" runat="server"><asp:ListItem Value="难" Selected=true>难</asp:ListItem><asp:ListItem Value="中等">中等</asp:ListItem><asp:ListItem Value="易">易</asp:ListItem></asp:DropDownList></td>
                        </tr>

⌨️ 快捷键说明

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