?? admincreatepaper1.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> > 生成試卷<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="下一步>>" 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 + -