📄 sdelete.asp
字号:
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新建网页 1</title>
</head>
<body>
<table border="1" width="506" height="297">
<tr>
<td height="55" width="506" colspan="2">
<p align="center"><b><font size="6">学生信息删除</font></b></td>
</tr>
<form action="sdelete.asp" method="post">
<tr>
<td height="56" width="205">
<p align="right">学生学号:</td>
<td height="56" width="285"><input type="text" name="T2" size="20"></td>
</tr>
<tr>
<td height="52" width="506" colspan="2">
<p align="center">
<input type="submit" value="提交" name="B1"> <input type="reset" value="重置" name="B2"></td>
</tr>
</form>
<tr>
<td height="120" width="506" colspan="2">
<%
if request.form("B1")="提交" then
stno=request.form("T2")
if stno="" then
response.write"请输入学号"
else
dim conn,connstr
connstr="Driver={sql server};UID=sa;PWD=sa;database=zikao;server=BILLGATES"
set conn=server.createobject("ADODB.CONNECTION")
conn.open connstr
set rs=Server.CreateObject("ADODB.Recordset")
sql="select * from register where sno='"&stno&"'"
sql1="delete from register where sno='"&stno&"'"
rs.open sql,conn
if rs.eof then
response.write"学号不存在"
else
set rs1=Server.CreateObject("ADODB.Recordset")
rs1.open sql1,conn
response.write"删除成功"
end if
rs.close
set rs=nothing
end if
end if
%>
</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -