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

📄 webcreatepaper1.asp

📁 一套在线考试系统
💻 ASP
字号:
<!--#include file="conn.asp"-->
<html>

<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta name="GENERATOR" content="Microsoft FrontPage 4.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(myform){
if (myform.subject.value==""){
  alert("请选择考试科目!")
  myform.subject.focus();
  return false;
}
if (myform.examname.value==""){
  alert("请输入考试名称!")
  myform.examname.focus();
  return false;
}
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){
  alert("设定的总分和卷面总分不相符,请修改卷面总分或者调整题型分布和分值分布!");
  return false;
}
starttime=myform.starttime.value;
endtime=myform.endtime.value;
if (starttime==""  ){
  alert("起始时间和结束时间不能为空!");
  return false;
}
if (starttime > endtime){
  alert("起始时间不能大于结束时间!");
  return false;
}
}
</script>
<link rel="stylesheet" type="text/css" href="../Default.css">
<script language="JavaScript1.2" src="../js/lock.js"></script>
</head>

<body bgcolor="#FFFFFF">

<form method="POST" action="webcreatepaper2.asp" name="firstform" onsubmit="return submitit(this);">
  <table border="0" cellspacing="0" style="border-collapse: collapse" width="100%" id="AutoNumber2" height="25" cellpadding="0">
    <tr>
      <td width="100%">当前位置:web考试管理 &gt; <font color="#FF0000">设定考试科目</font><font color="#FF0000">第一步</font></td>
    </tr>
  </table>
  <table border="1" cellspacing="0" style="border-collapse: collapse" id="AutoNumber1" cellpadding="0" class="withborder" width="100%" bordercolor="#007CD0" bgcolor="#F1F1F1">
    <tr height="30">
      <td colspan="4" height="25" class="border_blue">
        <p align="center">试卷基本信息</td>
    </tr>
    <tr height="20">
      <td height="25" class="border_bold" width="120" align="center">
        <p align="center">选择科目</td>
      <td colspan="3" style="font-size: 9pt; color: #000000"><b>&nbsp;<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></b></td>
    </tr>
    <tr height="20">
      <td height="25" class="border_bold" width="120" align="center">考试名称</td>
      <td colspan="3" style="font-size: 9pt; color: #000000">&nbsp;<input type="text" name="examname" size="62" class="s01"></td>
    </tr>
    <tr height="20">
      <td colspan="4" height="25" class="border">
        <p align="center">试卷信息</td>
    </tr>
    <tr height="20">
      <td align="center" height="25" class="border_bold">卷面总分</td>
      <td style="font-size: 9pt; color: #000000" align="center"><b><input type="text" name="totalper" size="12" class="s01" onkeyup="if(isNaN(this.value)) this.value='10';" onblur="if(isNaN(this.value)) this.value='10';checktotal();" value="100"></b>(<font color="#FF0000">分</font>)</td>
      <td colspan="2" id="tishi"> </td>
    </tr>
    <tr height="20">
      <td align="center" height="25" class="noborder1"> </td>
      <td class="border_bold" align="center">单选题</td>
      <td class="border_bold" align="center">多选题</td>
      <td class="border_bold" align="center">判断题</td>
    </tr>
    <tr height="20">
      <td align="center" height="25" class="border_bold">题型分布</td>
      <td style="font-size: 9pt; color: #000000" align="center"><b><input type="text" name="singlecount" size="12" class="s01" onkeyup="if(isNaN(this.value)) this.value='10';" onblur="if(isNaN(this.value)) this.value='10';checktotal();" value="10"></b>(<font color="#FF0000">个</font>)</td>
      <td style="font-size: 9pt; color: #000000" align="center"><b><input type="text" name="multicount" size="12" class="s01" onkeyup="if(isNaN(this.value)) this.value='15';" onblur="if(isNaN(this.value)) this.value='15';checktotal();" value="15"></b>(<font color="#FF0000">个</font>)</td>
      <td style="font-size: 9pt; color: #000000" align="center"><b><input type="text" name="judgecount" size="12" class="s01" onkeyup="if(isNaN(this.value)) this.value='10';" onblur="if(isNaN(this.value)) this.value='10';checktotal();" value="10"></b>(<font color="#FF0000">个</font>)</td>
    </tr>
    <tr height="20">
      <td align="center" height="25" class="border_bold">分值分布</td>
      <td style="font-size: 9pt; color: #000000" align="center"><b><input name="singleper" size="12" class="s01" onkeyup="if(isNaN(this.value)) this.value='2';" onblur="if(isNaN(this.value)) this.value='2';checktotal();" value="2"></b>(<font color="#FF0000">分</font>)</td>
      <td style="font-size: 9pt; color: #000000" align="center"><b><input type="text" name="multiper" size="12" class="s01" onkeyup="if(isNaN(this.value)) this.value='4';" onblur="if(isNaN(this.value)) this.value='4';checktotal();" value="4"></b>(<font color="#FF0000">分</font>)</td>
      <td style="font-size: 9pt; color: #000000" align="center"><b><input type="text" name="judgeper" size="12" class="s01" onkeyup="if(isNaN(this.value)) this.value='2';" onblur="if(isNaN(this.value)) this.value='2';checktotal();" value="2"></b>(<font color="#FF0000">分</font>)</td>
    </tr>
    <tr height="20">
      <td align="center" colspan="4" height="25" class="border">考试时间设定</td>
    </tr>
    <tr height="20">
      <td align="center" height="25" class="border_bold">考试时间</td>
      <td colspan="3" align="center"><b><input type="text" name="examtime" size="12" class="s01" onkeyup="if(isNaN(this.value)) this.value='2';" onblur="checktotal();" value="2"></b>(<font color="#FF0000">小时</font>)</td>
    </tr>
    <tr height="20">
      <td align="center" height="25" class="border_bold">有效期</td>
      <td colspan="3" align="center"><b><input name="starttime" readonly class="s01" style="TEXT-ALIGN: center" size="16"><input onclick="popFrame.fPopCalendar(starttime,starttime,popCal);return false" class="c02" value="▼" size="2" name="1" readonly> 
        — <input name="endtime" readonly class="s01" style="TEXT-ALIGN: center" size="16"><input onclick="popFrame.fPopCalendar(endtime,endtime,popCal);return false" class="c02" value="▼" size="2" name="1" readonly></b></td>
    </tr>
  </table>
  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber4" height="30">
    <tr>
      <td width="100%">
        <p align="right"><input type="submit" value="下一步&gt;&gt;" name="B1" class="s02"></td>
    </tr>
  </table>
</form>
<!--  put these lines below ahead of you page --->
<div id="popCal" style="POSITION: absolute; VISIBILITY: hidden; WIDTH: 10px">
  <iframe frameBorder="0" height="160" name="popFrame" scrolling="no" width="282" src="POPCJS.asp">
  </iframe>
</div>
<script event="onclick()" for="document">popCal.style.visibility = "hidden";
</script>
<!--  put these lines above ahead of you page --->

</body>

</html>

⌨️ 快捷键说明

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