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

📄 tiankong_edit.asp

📁 自动出题系统,它是用asp做的,做的不好,请多多指教,为什么不能下载啊,上传多少才能下啊
💻 ASP
字号:
<!--#include file="conn.asp"-->
<script language=javascript>
function check()
{
if (document.form1.t1.value=="")
{alert("请录入题干!");
document.form1.t1.focus();
return false;}
if (document.form1.cate.value=="")
{alert("请录入正确答案!");
document.form1.cate.focus();
return false;}

document.form1.ctype.value="types";
document.form1.submit();
}

</script>
<%sql="select * from tiankong where id="&trim(request("id"))
set rs=conn.execute (sql)

if request("ctype")="types" then
sqlfind="select * from tiankong where question='"&trim(request("t1"))&"' and  id<>"&request("id")
set rss=conn.execute(sqlfind)
if not rss.eof then
%>
<script language=javascript>
alert("已有此试题!");
history.back();
</script>
<%else
sqledit="update tiankong set question='"&trim(request("t1"))&"',answer='"&request("cate")&"' ,setupdata='"&date()&"' where id="&request("id")
set rss=conn.execute(sqledit)



%>
<script language=javascript>
alert("试题修改成功!");
var now=new Date();
window.navigate("tiankong.asp?time="+now.getTime());

</script>
<%end if 
end if %>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>考试系统-编辑填空题</title>
</head>
<body bgcolor="#CCCCCC">
<!--#include file="top2.html"-->
<p>
<p align="center"><font face="隶书" size="6">填空题 编辑试题</font></p> 
<div align="center"> 
  <center> 
    <form name=form1 action="" >
  <input type="hidden" name="ctype" >
  <input type="hidden" name=id value=<%=trim(request("id"))%>>

  <table border="1" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="600"> 
    <tr> 
      <td align="center" colspan="3">修改填空题</td> 
    </tr> 
    <tr> 
      <td width="50" align="center" bgcolor="#000099"><font color="#FFFFFF">编号</font></td> 
      <td width="420" align="center" bgcolor="#000099"><font color="#FFFFFF">题目</font></td> 
      <td width="130" align="center" bgcolor="#000099"><font color="#FFFFFF">答案</font></td> 
    </tr> 
    <tr> 
      <td align="center"><%=rs("id")%></td> 
      <td> <input type="text" name="t1" size="55" class="line" value=<%=rs("question")%>></td> 
      <td align="center"> 
          <input type="text" name="cate" size="15" class="line" value=<%=rs("answer")%>></td> 
    </tr> 
    <tr> 
      <td colspan="3" align="center"> 
      <input type="button" value="提交" name="B1" onclick="check()" style="width: 60; height: 22; border-style: solid; border-width: 1px; background-color: #FFFFFF"> <input type="reset" value="重置" name="B2" style="width: 60; height: 22; border-style: solid; border-width: 1px; background-color: #FFFFFF"></td> 
    </tr> 
    </table>
    </form> 
  </center> 
</div>
<!--#include file="end.html"-->  
</body>
</html>

⌨️ 快捷键说明

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