📄 parameter_difficulty.asp
字号:
<!--#include file="conn.asp"-->
<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>
<link rel="stylesheet" type="text/css" href="../default.css">
<script language="JavaScript1.2" src="../js/lock.js"></script>
<script language="javascript">
function edit(paction,pid,pdifficulty,pap,pbp,pcp,pdp,pep)
{
if (document.all("obj").style.display=="none")
{
document.all("obj").style.display="";
}
with (addform)
{
action.value=paction;
id.value=pid;
difficulty.value=pdifficulty;
ap.value=pap;
bp.value=pbp;
cp.value=pcp;
dp.value=pdp;
ep.value=pep;
}
}
function submitit(myform)
{
with (myform)
{
if (difficulty.value=="")
{
alert("请选择难度!");
difficulty.focus();
return false;
}
if (ap.value=="")
{
alert("请输入“难”的比例!");
ap.focus();
return false;
}
if (bp.value=="")
{
alert("请输入“较难”的比例!");
bp.focus();
return false;
}
if (cp.value=="")
{
alert("请输入“中”的比例!");
cp.focus();
return false;
}
if (dp.value=="")
{
alert("请输入“较易”的比例!");
dp.focus();
return false;
}
if (ep.value=="")
{
alert("请输入“易”的比例!");
ep.focus();
return false;
}
var p;
p=eval(ap.value)+eval(bp.value)+eval(cp.value)+eval(dp.value)+eval(ep.value);
if (p!=100)
{
alert("难度比例之和不等于100!");
return false;
}
}
}
function checkall(form)
{
for (var i=0;i<form.elements.length;i++)
{
var e = form.elements[i];
if (e.name != 'chkall')
e.checked = form.chkall.checked;
}
}
function dis()
{
if (document.all("obj").style.display=="")
{
document.all("obj").style.display="none";
}
else
{
document.all("obj").style.display="";
}
}
</script>
</head>
<body oncontextmenu="self.event.returnValue=false" bgcolor="#FFFFFF">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
<tr>
<td width="100%">当前位置:<a href="admin_parameter.asp">组卷参数设置</a> >
<font color="#FF3300">平均难度计算模式表</font></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr>
<td width="100%" style="height: 30">
<input type="button" value="添加新模式表" name="B2" class="s02" onclick="dis()"></td>
</tr>
<tr>
<td width="100%" id="obj">
<form method="POST" name="addform" action="parameter_difficulty_save.asp" onsubmit="return submitit(this)">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#007CD0" width="100%" id="AutoNumber2" bgcolor="#F1F1F1">
<tr>
<td rowspan="2" class="border_blue" align="center" width="90">难度级别</td>
<td colspan="5" class="border_blue" align="center" width="100%">难度比例</td>
</tr>
<tr>
<td class="border" align="center" width="20%">难</td>
<td class="border" align="center" width="20%">较难</td>
<td class="border" align="center" width="20%">中</td>
<td class="border" align="center" width="20%">较易</td>
<td class="border" align="center" width="20%">易</td>
</tr>
<tr>
<td align="center"><select size="1" name="difficulty">
<option selected>[选择难度]</option>
<option value="难">难</option>
<option value="较难">较难</option>
<option value="中">中</option>
<option value="较易">较易</option>
<option value="易">易</option>
</select></td>
<td align="center"><input type="hidden" name="action" value="addnew">
<input type="hidden" name="id">
<input type="text" name="ap" maxlength="2" onkeyup="if(isNaN(this.value)) this.value='';" onblur="if(isNaN(this.value)) this.value=''" size="8" class="s01"></td>
<td align="center">
<input type="text" name="bp" maxlength="2" onkeyup="if(isNaN(this.value)) this.value='';" onblur="if(isNaN(this.value)) this.value=''" size="8" class="s01"></td>
<td align="center">
<input type="text" name="cp" maxlength="2" onkeyup="if(isNaN(this.value)) this.value='';" onblur="if(isNaN(this.value)) this.value=''" size="8" class="s01"></td>
<td align="center">
<input type="text" name="dp" maxlength="2" onkeyup="if(isNaN(this.value)) this.value='';" onblur="if(isNaN(this.value)) this.value=''" size="8" class="s01"></td>
<td align="center">
<input type="text" name="ep" maxlength="2" onkeyup="if(isNaN(this.value)) this.value='';" onblur="if(isNaN(this.value)) this.value=''" size="8" class="s01"></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber3" height="30">
<tr>
<td width="100%" align="right">
<input type="submit" value="保 存" name="B1" class="s02">
<input type="reset" value="重 置" name="B2" class="s02"></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#007CD0" id="AutoNumber4" bgcolor="#F1F1F1">
<form method="POST" name="editform" action="parameter_difficulty_delete.asp">
<tr>
<td align="right" class="border_blue" colspan="9" style="height: 30">
<input type="checkbox" name="chkall" value="ON" onclick="checkall(this.form)">全部选择/取消
<input type="submit" value="删除所选项" name="B1" class="s02"></td>
</tr>
<tr>
<td rowspan="2" align="center" class="border" width="20"> </td>
<td rowspan="2" align="center" class="border" width="40">序号</td>
<td rowspan="2" align="center" class="border" width="120">难度级别</td>
<td colspan="5" align="center" class="border" width="739">难度比例</td>
<td align="center" class="border" rowspan="2" width="61">编辑</td>
</tr>
<tr>
<td align="center" class="border" width="148">难</td>
<td align="center" class="border" width="148">较难</td>
<td align="center" class="border" width="148">中</td>
<td align="center" class="border" width="148">较易</td>
<td align="center" class="border" width="148">易</td>
</tr>
<% sql="select * from parameter_difficulty order by difficulty"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,3,1
dim i,id,difficulty,ap,bp,cp,dp,ep
i=1
do while not rs.eof
id=rs("id")
difficulty=rs("difficulty")
ap=rs("ap")
bp=rs("bp")
cp=rs("cp")
dp=rs("dp")
ep=rs("ep") %>
<tr>
<td align="center" width="20" bgcolor="#C0C0C0">
<input type="checkbox" name="id" value="<%=rs("id")%>"></td>
<td align="center" width="40"><%=i%> </td>
<td align="center" width="120"><%=difficulty%> </td>
<td align="center" width="148"><%=ap%> </td>
<td align="center" width="148"><%=bp%> </td>
<td align="center" width="148"><%=cp%> </td>
<td align="center" width="148"><%=dp%> </td>
<td align="center" width="148"><%=ep%> </td>
<td align="center" width="61">
<a title="编辑" href="javascript:dis(); edit('edit','<%=rs("id")%>','<%=rs("difficulty")%>',<%=rs("ap")%>,<%=rs("bp")%>,<%=rs("cp")%>,<%=rs("dp")%>,<%=rs("ep")%>)">
<img border="0" src="../images/EDIT.GIF" style="cursor:hand" onclick="edit()"></a></td>
</tr>
<% rs.movenext
i=i+1
loop %>
</form>
</table>
<script language="javascript">
document.all("obj").style.display="none";
</script>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -