⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 updatest1.asp

📁 在线教育系统包括答疑问题提问课程介绍可见下载等模块设计
💻 ASP
字号:
<%
 testid=Request("testid")
 Set conn = Server.CreateObject("ADODB.Connection")
	conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath("CSTUDY.mdb")
	set rootrs= server.createobject("adodb.recordset") 	
		sql="select * from test where ID="&testid&""
Set rs= conn.Execute(sql) 
 %>
<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.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;
}

}
// -->
</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="updatest2.asp" name="updatest" onsubmit="return checkcontent()">
<TR>
<TD align=left width="396" height="30">
<%y=rs("subject")
if len(y)>30 then
str_title1=left(y,30)&"…"
else
str_title1=rs("subject")
end if %>
<font color="#FF0000">题目:</font><input type="text" name="content" size="58" class=td1 value="<%=str_title1%>">
</TD>
</TR>
<tr>
<TD align=center width="396" height="199" valign="top">
<hr size="1" color="#000000">
<table border="0" width="104%" height="44">
<tr>
<td width="12%" height="40"></td>
<td width="88%" height="40"><font color="#FF0000">A.</font>&nbsp;<input type="text" name="a" size="54" class=td1 value="<%=rs("A")%>"></td>
</tr>
<tr>
<td width="12%" height="40"></td>
<td width="88%" height="40"><font color="#FF0000">B.</font>&nbsp;<input type="text" name="b" size="54" class=td1 value="<%=rs("B")%>"></td>
</tr>
<tr>
<td width="12%" height="40"></td>
<td width="88%" height="40"><font color="#FF0000">C.</font>&nbsp;<input type="text" name="c" size="54" class=td1 value="<%=rs("C")%>"></td>
</tr>
<tr>
<td width="12%" height="41"></td>
<td width="88%" height="41"><font color="#FF0000">D.</font>&nbsp;<input type="text" name="d" size="54" class=td1 value="<%=rs("A")%>"></td>
</tr>
<tr>
<td width="100%" height="48" colspan="2">
<font color="#FF0000"> &nbsp; <font color="#FF0000">题目说明:</font><textarea rows="2" name="explain" cols="51" class=td1>
<%if rs("explain")="无" then
response.write "无"
else
response.write rs("explain")
end if%>
</textarea>   
</font>
</td>
</tr>
<tr>
<td width="100%" height="1" colspan="2">
<font color="#FF0000">答案:</font><select size="1" name="answer" class="td1">
<option value="<%=rs("answer")%>" selected><%=rs("answer")%></option>
<option value="A">A</option>
<option value="B">B</option>
<option value="C">C</option>
<option value="D">D</option>
</select>

&nbsp;</td>
</tr>
</table>
</TD>
</tr>
<tr>
<TD align=center width="396" height="29" valign="top">
<input type="hidden" value="<%=rs("ID")%>" name="testid">
<input type="submit" value="修改题目" name="B1"><input type="reset" value="全部重写" name="B2">
</form>
</TD>
</tr>
</TABLE>
<%set rs=nothing
conn.close
set conn=nothing
%>
<br clear=all>
<p>&nbsp;
<center><a href="javascript:onClick= window.close()">关闭窗口</a></center>
</p>

</form>
</body>




⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -