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

📄 assembletestpaperadd.asp

📁 在线考试系统
💻 ASP
字号:
<?xml version="1.0" encoding="gb2312"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script>
function checkForm(){
	if(form1.TestPaperTempletName.value==""){
	alert("请填写试卷模板名称!");
	form1.TestPaperTempletName.focus();
	return false;
	}
	if(form1.Length.value==""){
	alert("请填写试卷模板考试时间!");
	form1.Length.focus();
	return false;
	}
	if(form1.Score.value==""){
	alert("请填写试卷模板总分!");
	form1.Score.focus();
	return false;
	}
	if(form1.TianKongNum.value=="0" && form1.PanDuanNum.value=="0"&&form1.DanXuanNum.value=="0"&&form1.JianDaNum.value=="0"){
		alert("模板中各题型数量不能全为0!");
		form1.TianKongNum.focus();
		return false;
	}
	if(!checkNumScore("TianKong"))return false;
	if(!checkNumScore("PanDuan"))return false;
	if(!checkNumScore("DanXuan"))return false;
	if(!checkNumScore("JianDa"))return false;
	return true;
}
function checkNumScore(id){
	if((document.getElementById(id+"Num").value=="0"&&document.getElementById(id+"Score").value!="0")||(document.getElementById(id+"Score").value=="0"&&document.getElementById(id+"Num").value!="0")){
	alert("题型数量和分数必须同时填写!");
	if(document.getElementById(id+"Num").value==""){
		document.getElementById(id+"Num").focus();
	}else{
		document.getElementById(id+"Score").focus();
	}
	return false;
	}
	return true;
}

</script>
<link href="main.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
<h3 align="center">添加新试卷模板</h3>

<form name="form1" id="form1" method="post" action="AssembleTestPaperUpdate.asp?oper=add" onsubmit="return checkForm();">
  <table width="256" border="1" align="center" cellpadding="2" cellspacing="2" bordercolor="#999999">
    <tr align="center"> 
      <td colspan="3"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr align="center"> 
            <td width="72" bgcolor="#F3F3F3">名称:</td>
            <td colspan="3"> <input name="TestPaperTempletName" type="text" id="TestPaperTempletName" size="30" maxlength="40" /> 
            </td>
          </tr>
          <tr align="center"> 
            <td width="72" bgcolor="#F3F3F3">时间:</td>
            <td width="79"><input name="Length" type="text" id="Length2" value="100" size="5" onKeyUp="value=value.replace(/[^\d]/g,'')" />
              分钟 </td>
            <td width="65" bgcolor="#F3F3F3">总分:</td>
            <td width="48"><input name="Score" type="text" id="Length3" value="100" size="5" onKeyUp="value=value.replace(/[^\d]/g,'')" /></td>
          </tr>
        </table></td>
    </tr>
    <tr align="center"> 
      <td width="58" height="21" bgcolor="#F3F3F3">题型</td>
      <td width="78" bgcolor="#F3F3F3">数量</td>
      <td width="108" bgcolor="#F3F3F3">分值</td>
    </tr>
    <tr align="center"> 
      <td bgcolor="#F3F3F3">填空题</td>
      <td> <input name="TianKongNum" type="text" id="TianKongNum" value="0"   size="5" onKeyUp="value=value.replace(/[^\d]/g,'')" /></td>
      <td> <input name="TianKongScore" type="text" id="TianKongScore" value="0" size="5" onKeyUp="value=value.replace(/[^\d]/g,'')" /></td>
    </tr>
    <tr align="center"> 
      <td bgcolor="#F3F3F3">判断题</td>
      <td><input name="PanDuanNum" type="text" id="PanDuanNum" value="0" size="5" onKeyUp="value=value.replace(/[^\d]/g,'')" /></td>
      <td><input name="PanDuanScore" type="text" id="PanDuanScore" value="0" size="5"  onKeyUp="value=value.replace(/[^\d]/g,'')" /></td>
    </tr>
    <tr align="center"> 
      <td bgcolor="#F3F3F3">单选题</td>
      <td><input name="DanXuanNum" type="text" id="DanXuanNum" value="0" size="5" onKeyUp="value=value.replace(/[^\d]/g,'')" /></td>
      <td><input name="DanXuanScore" type="text" id="DanXuanScore" value="0" size="5" onKeyUp="value=value.replace(/[^\d]/g,'')" /></td>
    </tr>
    <tr align="center"> 
      <td bgcolor="#F3F3F3">简答题</td>
      <td><input name="JianDaNum" type="text" id="JianDaNum" value="0" size="5"  onKeyUp="value=value.replace(/[^\d]/g,'')" /></td>
      <td><input name="JianDaScore" type="text" id="JianDaScore" value="0" size="5" onKeyUp="value=value.replace(/[^\d]/g,'')" /></td>
    </tr>
    <tr align="center"> 
      <td colspan="3"><input name="Submit" type="submit"  value="提交" />
        &nbsp; <input type="reset" name="Submit2" value="重置" /></td>
    </tr>
  </table>
</form>
<p>&nbsp;</p>
</body>
</html>

⌨️ 快捷键说明

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