exam_del.asp

来自「本人的课程设计。不足之处请大家指教。因为第一次用ASP有很多不足的地方。」· ASP 代码 · 共 45 行

ASP
45
字号
<!-- #include file="cookies.asp" -->
<!-- #include file="conn/conn.asp" -->
<%

if request.querystring("type")="del" then		'确认删除
	'删除试卷
	sql="delete from exam where ename='"&trim(request.querystring("ename"))&"' and eid='"&trim(request.querystring("eid"))&"'"
	conn.execute(sql)
	'删除所有试卷与题目的对应关系
	sql2="delete from ex_que where ename='"&trim(request.querystring("ename"))&"' and eid='"&trim(request.querystring("eid"))&"'"
	conn.execute(sql2)
	conn.close
	set conn=nothing
	%>
	<script>
	window.alert("成功删除一份试卷")
	self.opener.location.reload();
	window.close();
	</script>
<%
end if
%>
<html>
<head>
<title>确认删除试卷</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../style/style.css" type="text/css">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<table width="50%" border="0" align="center">
  <tr> 
    <td align="center"><font color="#FF0000">确认删除试卷</font></td>
  </tr>
  <tr> 
    <td align="center" height="50"><font color="#FF0000">请问是否确认删除试卷:<%=request.querystring("text")%></font></td>
  </tr>
  <tr>
    <td align="center" height="50">
      <input type="button" name="Submit" value="确认删除" onclick="location.href='exam_del.asp?type=del&eid=<%=trim(request.querystring("eid"))%>&ename=<%=trim(request.querystring("ename"))%>';">
      <input type="button" name="Submit2" value="取消" onclick="window.close();">
    </td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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