📄 newtest.asp
字号:
<%teacherid=Request("teacherid") %>
<HTML>
<HEAD>
<TITLE><%=title%></TITLE>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<link rel="stylesheet" type="text/css" href="css/index1.css">
<link rel="stylesheet" type="text/css" href="css/toolbar2.css">
<META content="Microsoft FrontPage 4.0" name=GENERATOR>
<base target="_self">
<SCRIPT lanuage="javascript">
<!-- Hide
function checkcontent()
{
if(document.updatest.content.value=="")
{
alert("题目不能为空!");
return false;
}
if(document.updatest.content.value.length >50)
{
alert("题目不能超过五十字!");
return false;
}
if(document.updatest.a.value=="")
{
alert("题目选项不能为空!");
return false;
}
if(document.updatest.b.value=="")
{
alert("题目选项不能为空!");
return false;
}
if(document.updatest.c.value=="")
{
alert("题目选项不能为空!");
return false;
}
if(document.updatest.d.value=="")
{
alert("题目选项不能为空!");
return false;
}
if(document.updatest.chapter.value=="")
{
alert("所属章节不能为空!");
return false;
}
if(document.updatest.explain.value=="")
{
alert("题目说明不能为空!");
return false;
}
if(document.updatest.a.value.length >50)
{
alert("题目选项不能超过五十字!");
return false;
}
if(document.updatest.b.value.length >50)
{
alert("题目选项不能超过五十字!");
return false;
}
if(document.updatest.c.value.length >50)
{
alert("题目选项不能超过五十字!");
return false;
}
if(document.updatest.d.value.length >50)
{
alert("题目选项不能超过五十字!");
return false;
}
if(document.updatest.explain.value.length >100)
{
alert("题目说明不能超过一百字!");
return false;
}
}
// -->
</SCRIPT>
</HEAD>
<BODY background="image/A-bg.gif" leftMargin=0 topMargin=0>
<TABLE border="1" width="446" align="center" bordercolorlight="#000000" bordercolordark="#FFFFFF" cellspacing="0" cellpadding="5" bgcolor="#A4D1FF" height="285">
<form method="POST" action="addtest.asp" name="updatest" onsubmit="return checkcontent()">
<TR>
<TD align=left width="396" height="30">
<font color="#FF0000">题目:</font><input type="text" name="content" size="58" class=td1>
</TD>
</TR>
<tr>
<TD align=center width="396" height="199" valign="top">
<hr size="1" color="#000000">
<table border="0" width="104%" height="91">
<tr>
<td width="12%" height="40"></td>
<td width="88%" height="40"><font color="#FF0000">A.</font> <input type="text" name="a" size="54" class=td1></td>
</tr>
<tr>
<td width="12%" height="40"></td>
<td width="88%" height="40"><font color="#FF0000">B.</font> <input type="text" name="b" size="54" class=td1></td>
</tr>
<tr>
<td width="12%" height="40"></td>
<td width="88%" height="40"><font color="#FF0000">C.</font> <input type="text" name="c" size="54" class=td1></td>
</tr>
<tr>
<td width="12%" height="41"></td>
<td width="88%" height="41"><font color="#FF0000">D.</font> <input type="text" name="d" size="54" class=td1></td>
</tr>
<tr>
<td width="100%" height="48" colspan="2">
<font color="#FF0000"> 题目说明:</font><textarea rows="2" name="explain" cols="51" class=td1 wrap="hard">无</textarea>
</td>
</tr>
<tr>
<td width="100%" height="1" colspan="2">
<hr size="1" color="#000000">
<font color="#FF0000"> 所属章节:</font>
<select size="1" name="chapter" class="td1">
<%
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath("CSTUDY.mdb")
set rs= server.createobject("adodb.recordset")
sql1="select * from tutorial where teacher="&teacherid&""
set rs1=conn.execute(sql1)
response.write "<option value=''>"&"请选择题目所属章节"
response.write "</option>"
Do While Not rs1.Eof
response.write "<option value='"&rs1("ID")&"'>"& rs1("rule") & rs1("title")
response.write "</option>"
rs1.movenext
loop
%>
</select>
<font color="#FF0000">答案:</font><select size="1" name="answer" class="td1">
<option value="A">A</option>
<option value="B">B</option>
<option value="C">C</option>
<option value="D">D</option>
</select>
</td>
</tr>
</table>
</TD>
</tr>
<tr>
<TD align=center width="396" height="29" valign="top">
<input type="hidden" value="<%=teacherid%>" name="teacherid">
<input type="submit" value="添加题目" name="B1"><input type="reset" value="全部重写" name="B2">
</form>
</TD>
</tr>
</TABLE>
<%set rs=nothing
conn.close
set conn=nothing
%>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -