📄 testchangp.asp
字号:
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>test change process</title>
</head>
<%
sno=session("studno")
if request.form("B1")<>"提交" then
cno=request.querystring("courseno")
session("cno")=cno
end if
%>
<body leftmargin="150">
<table border="1" width="336" height="309">
<tr>
<td height="62" width="326" colspan="2">
<p align="center"><b><font size="7">考试信息修改</font></b></td>
</tr>
<form action="testchangp.asp" method="post">
<tr>
<td height="43" width="131">课程编号</td>
<td height="43" width="189"><input type="text" name="T1" size="20"></td>
</tr>
<tr>
<td height="37" width="131">课程名称</td>
<td height="37" width="189"><input type="text" name="T2" size="20"></td>
</tr>
<tr>
<td height="44" width="131">考试时间</td>
<td height="44" width="189"><input type="text" name="T3" size="20"></td>
</tr>
<tr>
<td height="54" width="326" colspan="2">
<p align="center"><input type="submit" value="提交" name="B1"> <input type="reset" value="重置" name="B2"></td>
</tr>
<%
if request.form("B1")="提交"then
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")
cno=session("cno")
sql="update grade set coursename= '"&request.form("T2")&"', courseno= '"&request.form("T1") &"',coursetime= '" &request.form("T3")&"' where sno= '"&sno&"' and courseno= '"&cno&"'"
rs.open sql,conn
%>
<tr>
<td height="48" width="326" colspan="2">
<%
response.write "修改成功"
%>
</td>
</tr>
<%
end if
%>
</form>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -