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

📄 createtest1.asp

📁 网络教学平台由教师教学系统、学生学习系统和教学管理系统三大模块组成
💻 ASP
字号:
<!--#include file="Check.asp"-->
<!--#include file="Conn.asp"-->
<html>
<%
Dim TeachingSujectID 
TeachingSujectID = Session("TestTeachingSujectID")
Session("TestTeachingSujectID") = TeachingSujectID
%>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>自测基本信息</title>

<link rel="stylesheet" type="text/css" href="css.css">
<style type="text/css">
<!--
body,td,th {
	font-size: 12px;
}
body {
	background-color: #B1DB99;
}
-->
</style></head>




<script language="javascript">

function checktotal(){
var myform=document.MyForm;
var a=myform.CountA.value;
var b=myform.ResultA.value;
var c=myform.CountB.value;
var d=myform.ResultB.value;
var e=myform.CountC.value;
var f=myform.ResultC.value;
var i=myform.TotalResult.value;
var j=a*b+c*d+e*f;
  myform.TotalResult.value=j;
}

function submitit(){
var myform;
myform=document.MyForm;
if (myform.subject.value==""){
  alert("请选择自测类别!")
  myform.subject.focus();
  return false;
  }
if (myform.TestName.value==""){
  alert("请填入自测标题!")
  myform.TestName.focus();
  return false;
  }
else
  return true;
if (j!=i){
  alert("设定的总分和卷面总分不相符,请修改卷面总分或者调整题型分布和分值分布!");
  return false;
  }
else 
  return true;
}

</script>

<body onLoad="checktotal();">

<table width="100%" height="18" border="0" cellspacing="1" bordercolor="#C0C0C0" bgcolor="#D9ECFF" style="border-collapse: collapse">
  <tr>
    <td width="100%" background="../images/Down_bg.gif"> ★ <strong>当前位置: <font color="#FF0000">生成自测(步骤一)</font></strong></td>
  </tr>
</table>
<br>
<table border="1" cellspacing="1" style="border-collapse: collapse" id="AutoNumber1" height="98" bordercolor="#C0C0C0" cellpadding="0">
  <form method="POST" action="CreateTest2.asp" name="MyForm" onSubmit="return submitit();">
    <tr bgcolor="#D9ECFF" height="30"> 
      <td colspan="4" style="font-size: 9pt; color: #000000"> 
        <p align="center"><font color="#666666" size="3"><b>自测基本信息</b></font></td>
    </tr>
    <tr height="20"> 
      <td width="128" style="font-size: 9pt; color: #000000" bgcolor="#F4FAFF"> 
        <p align="center"><b><font color="#666666">选择类别</font></b></td>
      <td style="font-size: 9pt; color: #000000"> <select size="1" name="subject" onChange="Javascript:document.MyForm.TestName.value=this.value;">
          <option selected>--选择类别--</option>
          <% sql="select * from TestSubject Where TeachingSujectID ="&TeachingSujectID
      set rs=server.createobject("adodb.recordset")
      rs.open sql,conn,1,1
      do while not rs.eof %>
          <option value="<%=rs("TestSubject")%>"><%=rs("TestSubject")%></option>
          <% rs.movenext
      loop
      rs.close %>
        </select> 
      <td><p align="center"><font color="#666666"><b>填入标题:</b></font></p></td>
      <td align=center><input type=text name=TestName size="18" class="inputnormal" onBlur="this.className='inputnormal'" onFocus="this.className='inputedit';this.select()" > 
      </td>
    </tr>
    <tr bgcolor="#D9ECFF" height="20"> 
      <td colspan="4" style="font-size: 9pt; color: #000000"> <p align="center"><font color="#666666"><b>自测信息</b></font></td>
    </tr>
    <tr height="20"> 
      <td width="128" style="font-size: 9pt; color: #000000" align="center" bgcolor="#F4FAFF"> 
        <b><font color="#666666">卷面总分</font>(<font color="#FF0000">分</font>)</b></td>
      <td style="font-size: 9pt; color: #000000"> <p align="center"> 
          <input type="text" name="TotalResult" size="18" class="inputnormal" onKeyUp="if(isNaN(this.value)) this.value='100';" onBlur="this.className='inputnormal'" onFocus="this.className='inputedit';this.select()" value="100">
      </td>
      <td colspan="2">&nbsp; </td>
    </tr>
    <tr bgcolor="#D9ECFF" height="20"> 
      <td width="128" style="font-size: 9pt; color: #000000" align="center"> </td>
      <td style="font-size: 9pt; color: #000000"> <p align="center"><font color="#666666"><b>单选题</b></font></td>
      <td style="font-size: 9pt; color: #000000"> <p align="center"><font color="#666666"><b>多选题</b></font></td>
      <td style="font-size: 9pt; color: #000000"> <p align="center"><font color="#666666"><b>判断题</b></font></td>
    </tr>
    <tr height="20"> 
      <td width="128" style="font-size: 9pt; color: #000000" align="center" bgcolor="#F4FAFF"> 
        <b><font color="#666666">题型分布</font>(<font color="#FF0000">个</font>)</b></td>
      <td style="font-size: 9pt; color: #000000" width="195"> <p align="center"> 
          <input type="text" name="CountA" size="18" class="inputnormal" onKeyUp="if(isNaN(this.value)) this.value='10';" onBlur="this.className='inputnormal';checktotal();" onFocus="this.className='inputedit';this.select()" value="10">
      </td>
      <td style="font-size: 9pt; color: #000000" width="330"> <p align="center"> 
          <input type="text" name="CountB" size="18" class="inputnormal" onKeyUp="if(isNaN(this.value)) this.value='15';" onBlur="this.className='inputnormal';checktotal();" onFocus="this.className='inputedit';this.select()" value="15">
      </td>
      <td style="font-size: 9pt; color: #000000" width="328"> <p align="center"> 
          <input type="text" name="CountC" size="18" class="inputnormal" onKeyUp="if(isNaN(this.value)) this.value='10';" onBlur="this.className='inputnormal';checktotal();" onFocus="this.className='inputedit';this.select()" value="10">
      </td>
    </tr>
    <tr height="20"> 
      <td width="128" style="font-size: 9pt; color: #000000" align="center" bgcolor="#F4FAFF"> 
        <b><font color="#666666">分值分布</font>(<font color="#FF0000">分</font>)</b></td>
      <td style="font-size: 9pt; color: #000000" width="195"> <p align="center"> 
          <input name="ResultA" size="18" class="inputnormal" onKeyUp="if(isNaN(this.value)) this.value='2';" onBlur="this.className='inputnormal';checktotal();" onFocus="this.className='inputedit';this.select()" value="2">
      </td>
      <td style="font-size: 9pt; color: #000000" width="330"> <p align="center"> 
          <input type="text" name="ResultB" size="18" class="inputnormal" onKeyUp="if(isNaN(this.value)) this.value='4';" onBlur="this.className='inputnormal';checktotal();" onFocus="this.className='inputedit';this.select()" value="4">
      </td>
      <td style="font-size: 9pt; color: #000000" width="328"> <p align="center"> 
          <input type="text" name="ResultC" size="18" class="inputnormal" onKeyUp="if(isNaN(this.value)) this.value='2';" onBlur="this.className='inputnormal';checktotal();" onFocus="this.className='inputedit';this.select()" value="2">
      </td>
    </tr>
    <tr height="20"> 
      <td align="center" bgcolor="#F4FAFF"><font color="#666666"><b>选题方式</b></font></td>
      <td colspan=3><select name=Types>
          <option value=1>最新题目方式</option>
          <option value=2>随机选择方式</option>
		  <option value=3>自由组合方式</option>
        </select></td>
    </tr>
    <tr> 
      <td width="100%" colspan="5"> <p align="right"> 
          <input type="submit" value="下一步&gt;&gt;" name="B1" class="b2">
      </td>
    </tr>
  </form>
</table>
</body>

</html>

⌨️ 快捷键说明

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