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

📄 tiankong.asp

📁 这是用asp做的一个网上考试题库系统
💻 ASP
字号:
 <% language=VBscript%>
<%
  if Request.ServerVariables ("query_string")<>"" then
        Session("zsdh")=trim(Request.QueryString ("zsdh"))
        Session("zsdm")=trim(Request.QueryString ("zsdm"))
  
   end if

%>

<html>

<head>
<style>
  .bodyStyle {font-family: "Verdana", "Arial";
              font-size: 10pt;
              color:  #00309c}

  .bodyStyle2 {font: 10pt "Verdana", "Arial";
               margin-left:12pt;
              background-image:  url(../djst/share/blue_gradient.jpg);
              background-attachment: fixed;
              color:  #00309c;
              width:532px}

  A:HOVER {
           text-decoration: none }

  A:LINK { text-decoration: none }

  A:ACTIVE { 
             text-decoration: none }

  A:VISITED { text-decoration: none }

  TABLE   {margin-right: 20pt;
           font-size: 10pt;
           font-family: "Verdana", "Arial"}

  .active  {font-weight: bold;
            color: #00309c}
  .active2 {font-weight: bold;
            color: #405040}
  .visited {font-weight: normal;
            color: #405040 }

  .1      {margin-left: 0pt}
  .2      {margin-left: 16pt;
           width: 100pt}
  .3      {margin-left: 32pt;
           width: 90pt}
  .4      {margin-left: 45pt;
           width: 50pt}

</style>
 
<script language="JavaScript">
<!--
 var arr= new Array(5);
    arr[0]="答案一:";
    arr[1]="答案二:";
    arr[2]="答案三:";
    arr[3]="答案四:";
    arr[4]="答案五:";
    
var a;
a=0;
function AddTiankong(){
	if (a<5){
		a=a+1;
		form1.shtnr.value=form1.shtnr.value + '________';
	} else alert('您已经加入了五个空,最多只允许添加五个空!您可以考虑重新填写填空项');
}

function ResetTiankong(){
	form1.shtnr.value='';
	a=0;
}

function checkDaAn(){
var i,submit;
	submit=true;
	 
	if ((document.form1.da1.value=="")||(document.form1.shtnr .value =="")) {
		alert('请检查您的试题内容和答案是否写全呢!');
		return false;
	}
	for(i=1;(i<=a)&&(('da'+i)!=document.form1.last.name);i++){
		str='da'+ i;
		if (document.form1[str].value=='') submit=false;
	 
	}
	if((document.form1 [document.form1.last.name].value=="")||(('da'+a)!= document.form1.last.name)) submit=false;
	 
	if (submit==false) alert('题目与答案的数量不一致!')
	 else document.form1 .submit ()
}
function addanswer()
{
var i,f;
if(a!=0)
{
for(i=1;i<=a;i++){
		str='da'+ i;
		if (document.form1 .last.name==str) break ;
	}
if (i<a)
{
  str1=  " <table width=\"75%\" border=\"0\" id=sttable> "
  for(f=1;f<=i;f++){
   str1+="<tr><td><div align=\"center\">"+arr[f-1]+
          "<input type=\"text\"  name=\"da"+f+"\" maxlength=\"50\" size=\"30\"class=\"input\" value=\""+document.form1 ["da"+f].value+"\" style=\"background-color: #FFFFFF; border-style: solid; border-width: 1 \">"+
         "</div></td></tr>";
      }
  str1+="<tr><td><div align=\"center\">"+arr[f-1]+
          "<input type=\"text\" id=\"last\"  name=\"da"+f+"\" maxlength=\"50\" size=\"30\"class=\"input\"style=\"background-color: #FFFFFF; border-style: solid; border-width: 1 \">"+
         "</div></td></tr></table>"
  sttable.outerHTML =str1; 

}
}	
}
function delanswer()
{
var i,f;
for(i=1;i<=a;i++){
		str='da'+ i;
		if (document.form1 .last.name==str) break ;
	}
if(i>1){
	str1=  " <table width=\"75%\" border=\"0\" id=sttable> "
  for(f=1;f<i-1;f++){
   str1+="<tr><td><div align=\"center\">"+arr[f-1]+
          "<input type=\"text\"  name=\"da"+f+"\" maxlength=\"50\" size=\"30\"class=\"input\" value=\""+document.form1 ["da"+f].value+"\"style=\"background-color: #FFFFFF; border-style: solid; border-width: 1 \">"+
        "</div></td></tr>";
  }
  str1+="<tr><td><div align=\"center\">"+arr[f-1]+
          "<input type=\"text\" id=\"last\"  name=\"da"+f+"\" maxlength=\"50\" size=\"30\"class=\"input\" value=\""+document.form1 ["da"+f].value+"\"style=\"background-color: #FFFFFF; border-style: solid; border-width: 1 \">"+
         "</div></td></tr></table>"
  sttable.outerHTML =str1; 
 
 }  
} 
function dxonmouseover()
{
  dx.style.color="#00FFFF";
}
function dxonmouseout()
{
  dx.style.color="#CCCCFF"
}
function daonmouseover()
{
  dan.style.color="#00FFFF";
}
function daonmouseout()
{
  dan.style.color="#CCCCFF"
}
function pdonmouseover()
{
  pd.style.color="#00FFFF";
}
function pdonmouseout()
{
  pd.style.color="#CCCCFF"
}
function fxonmouseover()
{
  fx.style.color="#00FFFF";
}
function fxonmouseout()
{
  fx.style.color="#CCCCFF"
}
-->
</script>
</head>



 
 
 <body class=bodyStyle2 bgcolor=#FFFFCC>
<form method="post" action="./tkcl.asp" ENCTYPE="multipart/form-data" name="form1" >
  <table width="48%" border="0" bgcolor="#FF6666" bordercolor="#FFFFFF">
    <tr bgcolor="#FF3333"> 
      <td width="15%" nowrap bgcolor="#FF9999"> <div onmouseover="daonmouseover() " onmouseout="daonmouseout()"> <a href="./da.asp"><font id=dan color="#CCCCFF">单项选择题</font></a></div></td>
      <td width="18%" nowrap bgcolor="#FF9999"> 
        <div onmouseover="dxonmouseover() " onmouseout="dxonmouseout()"><a href="../tjst/dux.asp"><font id=dx  color="#CCCCFF">多项选择题</font></a></div>
      </td>
      <td width="11%" nowrap bgcolor="#FF9999"> <a href="../tjst/tiankong.asp"><font id=tk color="#00FFFF">填空题</font></a>
      </td>
      <td width="9%" nowrap bgcolor="#FF9999"> 
        <div onmouseover="pdonmouseover() " onmouseout="pdonmouseout()"><a href="../tjst/pd.asp"><font id=pd color="#CCCCFF">判断题</font></a></div>
      </td>
      <td width="11%" nowrap bgcolor="#FF9999"> 
        <div onmouseover="fxonmouseover() " onmouseout="fxonmouseout()"><a href="../tjst/fx.asp"><font id=fx color="#CCCCFF">分析题 
          </font></a></div>
      </td>
    </tr>
  </table>
<div align="center">  
<table width="100%" border="0" bgcolor="#FF9999">
    <tr bgcolor="#FF9999"> 
      <td nowrap height="25"> 
        <h1> <font size="2" color="#3333FF">填空:(注意:黑体字项必须填写)</font></h1>
      </td>
  </tr>
</table>
  <table border=1 align="center" bordercolor=#ffffff bordercolorlight=#000000 cellspacing=0 width="765">
    <tr> 
      <td width="112" align="right" nowrap height="34"><font color="#FF0000">知 
        识 点:</font></td>
      <td width="186" nowrap height="34"><%=Session("zsdm")%> </td>
      <td width="99" nowrap height="34"> 
        <p align="center"><font color="#0000FF"><a href="../Selknowledge.asp?tx=3">多知识点选择</a></font> 
      </td>
      <td width="52" align="right" height="34"> 
        用途:
      </td>
      <td width="137" align="right" nowrap height="34"> 
        <select name="WorkType" size='1' style='width: 80; height: 23; position: relative'>" 
          <option value="Test" selected>用于考试</option>
          <option value="Work">用于作业</option>
          <option value="All">作业和考试</option>
        </select>&nbsp;</td>
      <td width="179" height="34">&nbsp; 
    </tr>
    <tr> 
      <td width="112" align="right" nowrap> 
        <div align="right"><b>难 度:</b></div> 
      </td> 
      <td colspan="5" width="624">  
        <input type="radio" value="0.9" name="nd"  
      id=nd> 
        难:1-0.8;  
        <input type="radio" value="0.7" name="nd"  
      id=nd> 
        较难:0.8-0.6;  
        <input type="radio" value="0.5" name="nd" checked> 
        中:0.6-0.4;  
        <input type="radio" value="0.3" name="nd"> 
        较易:0.4-0.2;  
        <input type="radio" value="0.1" name="nd" > 
        易:0.2-0</td> 
    </tr> 
    <tr>  
      <td width="112" align="right" nowrap><b>区 分 度:</b></td> 
      <td colspan="5" width="624">  
        <input type="radio" value="0.9" name="qfd"   
      id=qfd> 
        优:1-0.8;  
        <input type="radio" value="0.7" name="qfd"   
      id=qfd> 
        良:0.8-0.6;  
        <input type="radio" value="0.5" checked name="qfd"   
      id=qfd> 
        中:0.6-0.4;  
        <input type="radio" value="0.3" name="qfd"   
      id=qfd> 
        较差:0.4-0.2;  
        <input type="radio" value="0.1"  name="qfd" id=qfd   
     > 
        差:0.2-0</td> 
    </tr> 
    <tr>  
      <td width="112" align="right" nowrap><b>认知分类:</b></td> 
      <td colspan="5" width="624">  
        <input type="radio" name="rzhfl" value="1" id=rzhfl checked> 
        <span style="FONT-FAMILY: 宋体; mso-bidi-font-size: 10.0pt; mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman; mso-bidi-font-family: Times New Roman; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA"><font size="3">知道,</font></span>  
        <input type="radio" name="rzhfl" value="2" id=rzhfl> 
        <span style="FONT-FAMILY: 宋体; mso-bidi-font-size: 10.0pt; mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman; mso-bidi-font-family: Times New Roman; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA"><font size="3">领会,</font></span>  
        <input type="radio" name="rzhfl" value="3" id=rzhfl> 
        <span style="FONT-FAMILY: 宋体; mso-bidi-font-size: 10.0pt; mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman; mso-bidi-font-family: Times New Roman; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA"><font size="3">运用,</font></span>  
        <input type="radio" name="rzhfl" value="4" id=rzhfl> 
        <span style="FONT-FAMILY: 宋体; mso-bidi-font-size: 10.0pt; mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman; mso-bidi-font-family: Times New Roman; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA"><font size="3">分析,</font></span>  
        <input type="radio" name="rzhfl" value="5" id=rzhfl> 
        <span style="FONT-FAMILY: 宋体; mso-bidi-font-size: 10.0pt; mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman; mso-bidi-font-family: Times New Roman; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA"><font size="3">综合,</font></span>  
        <input type="radio" name="rzhfl" value="6" id=rzhfl> 
        <span style="FONT-FAMILY: 宋体; mso-bidi-font-size: 10.0pt; mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman; mso-bidi-font-family: Times New Roman; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA"><font size="3">评价</font></span></td> 
    </tr> 
    <tr>  
      <td width="112" align="right" nowrap>考试要求:</td> 
      <td colspan="5" width="624">  
        <input name="ksyq" size="87"   
     > 
      </td> 
    </tr> 
    <tr>  
      <td width="112" align="right" nowrap>评分标准:</td> 
      <td colspan="5" width="624">  
        <input name="pjbzh" size="87"   
     > 
      </td> 
    </tr> 
    <tr>  
      <td width="112" align="right" nowrap><b>建议的考试得分:</b></td> 
      <td colspan="2" width="289">  
        <input name="jyfsh" size="34" value=0  
     > 
      </td> 
      <td align="right" colspan="2" nowrap width="193">建议的考试时间:</td> 
      <td width="179">  
        <input name="jyshj" size="20" value=0  
     > 
        秒</td> 
    </tr> 
    <tr>  
      <td width="112" align="right" nowrap><b>出 题 人:</b></td> 
      <td colspan="2" width="289">  
        <input name="chtr" size="34" value=<%=Session("Username")%>>  
     
      </td> 
      <td align="right" colspan="2" nowrap width="193"><b>出题日期:</b></td> 
      <td width="179">  
        <input name="chtrq" size="24" value=<%=date()%>  
     > 
      </td> 
    </tr> 
    <tr>  
      <td width="112" align="right" nowrap><b>审 订 人:</b></td> 
      <td colspan="2" width="289">  
        <input name="shdr" size="34" value=<%=Session("Username")%>  
     > 
      </td> 
      <th align="right" colspan="2" width="193"><b>审订日期:</b></th> 
      <td width="179">  
        <input name="shdrq" size="24" value=<%=date()%>  
     > 
      </td> 
    </tr> 
  </table> 
    
   
<p align="center">试题内容</p>  
  <p><TEXTAREA cols=105 id="shtnr" name="shtnr" rows="5" class="input" style="background-color: #FFFFFF; border-style: solid; border-width: 1  
              "></TEXTAREA></p>  
            <p>  
              <input type="button" value="加入填空项" name="B3" onClick="AddTiankong();">  
              <input type="button" name="B4" value="重新填写填空项" onClick="ResetTiankong();">  
              (每一个填空项加入八个连续的半角下划线)</p>  
            <p align="center">试题答案</p>  
            
             
  <table width="75%" border="0" id=sttable> 
    <tr>  
      <td> 
        <div align="center">答案一:  
          <input type="text" id="last" name="da1" maxlength="50" size="30"class="input" style="background-color: #FFFFFF; border-style: solid; border-width: 1  
              "> 
        </div> 
      </td> 
    </tr> 
  </table> 
   
  <p >&nbsp; </p>  
           
  <p>  
    <input type="button" value="增加答案" onClick="addanswer()"> 
    <input type="button" value="减少答案" onClick="delanswer()"> 
  </p> 
  <p> 为该题上载附件:  
    <input TYPE="FILE" SIZE="60"  NAME="shtfj"> 
  </p> 
  <P>  
              <INPUT id=submit1 name=submit1 style="LEFT: 87px; TOP: 696px" type="button" value="录入此题" onClick="checkDaAn()">  
              <input type="reset" value="全部重写" name="B2"></P>  
</form>  
  
 
 
</div> 
 
 
 
 
</body> 
</html> 

⌨️ 快捷键说明

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