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

📄 admincreatepaper1.asp

📁 基于遗传算法
💻 ASP
字号:
<!--#include file="conn.inc"-->
<html>

<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>试卷基本信息</title>
<script language="javascript">

function checktotal(){
var myform=document.firstform;
var a=myform.singlecount.value;
var b=myform.singleper.value;
var c=myform.multicount.value;
var d=myform.multiper.value;
var e=myform.judgecount.value;
var f=myform.judgeper.value;
var i=myform.totalper.value;
var j=a*b+c*d+e*f;
if (j!=i){
  document.all.tishi.innerText=" 当前卷面总分:"+ j +",卷面总分与设定的不相符,请修改卷面总分或者调整题型分布和分值分布!";
  }
else
  document.all.tishi.innerText=" 当前卷面总分:"+ j;
}

function submitit(){
var myform=document.firstform;
var a=myform.singlecount.value;
var b=myform.singleper.value;
var c=myform.multicount.value;
var d=myform.multiper.value;
var e=myform.judgecount.value;
var f=myform.judgeper.value;
var i=myform.totalper.value;
var j=a*b+c*d+e*f;
if (myform.subject.value==""){
  alert("请选择考试科目!")
  myform.subject.focus();
  return false;
  }
if (j!=i){
  alert("设定的总分和卷面总分不相符,请修改卷面总分或者调整题型分布和分值分布!");
  return false;
  }
if (myform.nandu.value==""){
  alert("请设置考试难度!")
  myform.nandu.focus();
  return false;
  }
if (myform.nandu.value<1||myform.nandu.value>10){
  alert("考试难度设置范围为1-10之间的整数!")
  myform.nandu.focus();
  return false;
  }
if (myform.testtime.value==""){
  alert("请设置考试时间!")
  myform.testtime.focus();
  return false;
  }
if (myform.qufendu.value==""){
  alert("请设置考试的区分度!")
  myform.qufendu.focus();
  return false;
  }
if (myform.chapt1_num.value==""){
  alert("请设置考试章节的题数,没有输0!")
  myform.chapt1_num.focus();
  return false;
  }
if (myform.chapt2_num.value==""){
  alert("请设置考试章节的题数,没有输0!")
  myform.chapt2_num.focus();
  return false;
  }
if (myform.chapt3_num.value==""){
  alert("请设置考试章节的题数,没有输0!")
  myform.chapt3_num.focus();
  return false;
  }
if (myform.chapt4_num.value==""){
  alert("请设置考试章节的题数,没有输0!")
  myform.chapt4_num.focus();
  return false;
  }
if (myform.chapt5_num.value==""){
  alert("请设置考试章节的题数,没有输0!")
  myform.chapt5_num.focus();
  return false;
  }
else
  return true;
}
</script>
<link rel="stylesheet" type="text/css" href="css.css">
<style type="text/css">
<!--
.style1 {color: #FF0000}
.style3 {color: #0000FF}
-->
</style></head>
<body onload="checktotal();">

<table border="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber2" height="25">
  <tr>
    <td width="100%">当前位置:<a href="news.asp">系统管理</a> &gt; 生成试卷<img src="images/xinxi3.gif" width="20" height="18"></td>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber3">
  <tr>
    <td width="80"><img border="0" src="images/1.jpg" width="80" height="30"></td>
    <td> </td>
  </tr>
</table>
<table width="722" height="296" border="1" cellpadding="0" cellspacing="1" bordercolor="#C0C0C0" id="AutoNumber1" style="border-collapse: collapse">
  <form method="POST" action="admincreatepaper2.asp" name="firstform" onsubmit="return submitit();">
    <tr height="30">
      <td style="font-size: 9pt; color: #000000" colspan="6" bgcolor="#E1E1E1">
      <p align="center"><font size="3"><b>设置试卷基本信息</b></font></td>
    </tr>
    <tr height="20">
      <td width="102" style="font-size: 9pt; color: #000000" bgcolor="#EFEFEF">
      <p align="center"><b>选择科目</b></td>
      <td colspan="5" style="font-size: 9pt; color: #000000">
      <select size="1" name="subject">
      <option selected>--选择科目--</option>
      <% sql="select * from exam_subject"
      set rs=server.createobject("adodb.recordset")
      rs.open sql,conn,3,2
      do while not rs.eof %>
      <option value="<%=rs("exam_subject")%>"><%=rs("exam_subject")%></option>
      <% rs.movenext
      loop
      rs.close %></select></td>
    </tr>
    <tr height="20">
      <td colspan="6" style="font-size: 9pt; color: #000000" bgcolor="#E1E1E1">
      <p align="center"><b>试卷信息</b></td>
    </tr>
    <tr height="20">
      <td width="102" style="font-size: 9pt; color: #000000" align="center" bgcolor="#EFEFEF">
      <b>卷面总分(<font color="#FF0000">分</font>)</b></td>
      <td style="font-size: 9pt; color: #000000">
      <p align="center">      
        <input type="text" name="totalper" size="18" class="inputnormal" onKeyUp="if(isNaN(this.value)) this.value='10';" onBlur="this.className='inputnormal'" onFocus="this.className='inputedit';this.select()" value="100">
      </td>
      <td style="font-size: 9pt; color: #000000" colspan="4" id="tishi"> </td>
    </tr>
    <tr height="20">
      <td width="102" style="font-size: 9pt; color: #000000" align="center" bgcolor="#E1E1E1"> </td>
      <td style="font-size: 9pt; color: #000000" bgcolor="#E1E1E1">
      <p align="center"><b>单选题</b></td>
      <td colspan="2" bgcolor="#E1E1E1" style="font-size: 9pt; color: #000000">
      <p align="center"><b>多选题</b></td>
      <td colspan="2" bgcolor="#E1E1E1" style="font-size: 9pt; color: #000000">
      <p align="center"><b>判断题</b></td>
    </tr>
    <tr height="20">
      <td width="102" style="font-size: 9pt; color: #000000" align="center" bgcolor="#EFEFEF">
      <b>题型分布(<font color="#FF0000">个</font>)</b></td>
      <td style="font-size: 9pt; color: #000000" width="127">
      <p align="center">
      <input type="text" name="singlecount" size="18" class="inputnormal" onkeyup="if(isNaN(this.value)) this.value='10';" onblur="this.className='inputnormal';checktotal();" onfocus="this.className='inputedit';this.select()"></td>
      <td colspan="2" style="font-size: 9pt; color: #000000">
      <p align="center">
      <input type="text" name="multicount" size="18" class="inputnormal" onkeyup="if(isNaN(this.value)) this.value='15';" onblur="this.className='inputnormal';checktotal();" onfocus="this.className='inputedit';this.select()"></td>
      <td colspan="2" style="font-size: 9pt; color: #000000">
      <p align="center">
      <input type="text" name="judgecount" size="18" class="inputnormal" onkeyup="if(isNaN(this.value)) this.value='10';" onblur="this.className='inputnormal';checktotal();" onfocus="this.className='inputedit';this.select()"></td>
    </tr>
    <tr height="20">
      <td width="102" style="font-size: 9pt; color: #000000" align="center" bgcolor="#EFEFEF">
      <b>分值分布(<font color="#FF0000">分</font>)</b></td>
      <td style="font-size: 9pt; color: #000000" width="127">
      <p align="center">      
        <input name="singleper" size="18" class="inputnormal" onKeyUp="if(isNaN(this.value)) this.value='2';" onBlur="this.className='inputnormal';checktotal();" onFocus="this.className='inputedit';this.select()">
      </td>
      <td colspan="2" style="font-size: 9pt; color: #000000">
      <p align="center">
      <input type="text" name="multiper" size="18" class="inputnormal" onkeyup="if(isNaN(this.value)) this.value='4';" onblur="this.className='inputnormal';checktotal();" onfocus="this.className='inputedit';this.select()"></td>
      <td colspan="2" style="font-size: 9pt; color: #000000">
      <p align="center">
      <input type="text" name="judgeper" size="18" class="inputnormal" onkeyup="if(isNaN(this.value)) this.value='2';" onblur="this.className='inputnormal';checktotal();" onfocus="this.className='inputedit';this.select()"></td>
    </tr>
    <tr height="20">
      <td style="font-size: 9pt; color: #000000" align="center" bgcolor="#E1E1E1">
      <strong>难度设置(<span class="style1">1-10</span>)</strong></td>
      <td colspan="5" align="center" bgcolor="#FFFFFF" style="font-size: 9pt; color: #000000"><input name="nandu" type="text" class="inputnormal" id="nandu" onFocus="this.className='inputedit';this.select()" onBlur="this.className='inputnormal'" onKeyUp="if(isNaN(this.value)) this.value='2';" size="18"></td>
    </tr>
    <tr height="20">
      <td width="102" style="font-size: 9pt; color: #000000" align="center" bgcolor="#EFEFEF">
      <b>考试时间(<font color="#FF0000">小时</font>)</b></td>
      <td style="font-size: 9pt; color: #000000" colspan="5">
      <p align="center">
        <input type="text" name="testtime" id="testtime" size="18" class="inputnormal" onKeyUp="if(isNaN(this.value)) this.value='2';" onBlur="this.className='inputnormal'" onFocus="this.className='inputedit';this.select()" value="1">      
      </td>
    </tr>
    <tr height="20">
      <td width="102" style="font-size: 9pt; color: #000000" align="center" bgcolor="#EFEFEF">      <strong>区分度设置(<span class="style1">1-10</span>)</strong></td>
      <td style="font-size: 9pt; color: #000000" colspan="5">
      <p align="center">
        <input name="qufendu" type="text" class="inputnormal" id="qufendu" onFocus="this.className='inputedit';this.select()" onBlur="this.className='inputnormal'" onKeyUp="if(isNaN(this.value)) this.value='2';" size="18">      
      </td>
    </tr>
    <tr>
      <td rowspan="2" align="center" bgcolor="#EFEFEF"> <strong>章节设置 </strong></td>
      <td align="center" bgcolor="#EFEFEF"><strong>第一章题数</strong></td>
      <td align="center" bgcolor="#EFEFEF"><strong>第二章题数</strong></td>
      <td align="center" bgcolor="#EFEFEF"><strong>第三章题数</strong></td>
      <td align="center" bgcolor="#EFEFEF"><strong>第四章题数</strong></td>
      <td width="126" colspan="2" align="center" bgcolor="#EFEFEF"><strong>第五章题数</strong></td>
    </tr>
    <tr align="right">
      <td align="center"><input name="chapt1_num" type="text" class="inputnormal" id="chapt1_num" size="18" onkeyup="if(isNaN(this.value)) this.value='2';" onblur="this.className='inputnormal';" onfocus="this.className='inputedit';this.select()"></td>
      <td width="108" align="center"><input name="chapt2_num" type="text" class="inputnormal" id="chapt2_num" size="18" onkeyup="if(isNaN(this.value)) this.value='2';" onblur="this.className='inputnormal';" onfocus="this.className='inputedit';this.select()"></td>
      <td width="127" align="center"><input name="chapt3_num" type="text" class="inputnormal" id="chapt3_num" size="18" onkeyup="if(isNaN(this.value)) this.value='2';" onblur="this.className='inputnormal';" onfocus="this.className='inputedit';this.select()"></td>
      <td width="111" align="center"><input name="chapt4_num" type="text" class="inputnormal" id="chapt4_num" size="18" onkeyup="if(isNaN(this.value)) this.value='2';" onblur="this.className='inputnormal';" onfocus="this.className='inputedit';this.select()"></td>
      <td colspan="2" align="center"><input name="chapt5_num" type="text" class="inputnormal" id="chapt5_num" size="18" onkeyup="if(isNaN(this.value)) this.value='2';" onblur="this.className='inputnormal';" onfocus="this.className='inputedit';this.select()"></td>
    </tr>
    <tr align="left">
      <td align="center" bgcolor="#EFEFEF"><strong>有效期</strong></td>
      <td colspan="6" align="center"><input type="text" name="starttime" size="18" class="inputnormal" onBlur="javascript:this.className='inputnormal';vbscript:checkstarttime()" onFocus="this.className='inputedit';this.select()" value="<%=date()%>">
      <input type="text" name="endtime" size="18" class="inputnormal" onblur="this.className='inputnormal'" onfocus="this.className='inputedit';this.select()" value="<%=date()%>"></td>
    </tr>
    <tr align="right">
      <td colspan="7"><input type="submit" value="下一步&gt;&gt;" name="B1" class="s02"></td>
    </tr>
  </form>
</table>
<script language="vbscript" id="clientEventHandlersVBS">  
function checkstarttime()
if isDate(firstform.starttime.value)=false then
  msgbox "非法的开始日期格式!"
  firstform.starttime.focus
elseif firstform.starttime.value > firstform.endtime.value then
  msgbox "开始日期不能大于结束日期!"
  firstform.starttime.focus
end if 
end function
function checkendtime()
if isDate(firstform.endtime.value)=false then
  msgbox "非法的开始日期格式!"
  firstform.endtime.focus
elseif firstform.starttime.value > firstform.endtime.value then
  msgbox "开始日期不能大于结束日期!"
  firstform.endtime.focus
end if 
end function
</script>
<form name="form1" method="post" action="">
  <span class="style3">说明:试卷设置中的难度值和区分度值的取值为<font color="#FF0033">1</font>到<font color="#FF0033">10</font>的整数,且区分度在<font color="#FF0033">4</font>以上的试卷为优秀试卷,值为<font color="#FF0033">2</font>或<font color="#FF0033">3</font>的试卷尚可;难度值越大的试卷 
  其难度也越大。</span> 
</form>

</body>

</html>

⌨️ 快捷键说明

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