📄 modify.asp
字号:
<!--#include file="..\inc\conn.asp"-->
<!--#include file="..\inc\SessionCheck.asp"-->
<%
dim id
id=Trim(Request("id"))
if id="" then
Response.Write "<script language=JavaScript>{window.alert('没有信息需要修改!');window.history.go(-1);}</script>"
end if
Call DBConnBegin()
sSql="select * from StuInfo where [ID]="&CStr(id)
oRs.open sSql,oConn,3,2
if oRs.Eof and oRs.Bof then
Response.Write "<script language=JavaScript>{window.alert('没有信息需要修改!');window.history.go(-1);}</script>"
end if
dim stuid,stuname,stusex,stubirth,stuclass
stuid=oRs("StuID")
stuName=oRs("Stuname")
stusex=oRs("StuSex")
stubirth=oRs("StuBirth")
stuclass=oRs("Class")
oRs.close
%>
<html><head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>学生信息管理网站</title>
<link rel="stylesheet" href="..\inc\style.css" type="text/css">
</head>
<body topmargin="0" leftmargin="0">
<!--#include file="..\CommonFile\pagehead.asp"-->
<table width="738" border="0"><tr><td align=left>
<table width="736" height="35" cellspacing="0" cellpadding="0">
<td background="../images/top_1.jpg"> <a href="list.asp" class="link">学生信息列表</a>
| <a href="add.asp" class="link">录入学生信息</a>
| <a href="search.asp" class="link">学生信息查询</a></table>
<div align="center"><center>
<table border="0" width="500" cellspacing="0" cellpadding="0">
<tr>
<td width="100%">
<form method="POST" action="save.asp?op=modify&id=<%=stuid%>">
<table border="1" width="100%" bordercolorlight="#000000" cellspacing="0" cellpadding="5" bordercolordark="#FFFFFF">
<tr>
<td width="100%" colspan="2">
<p align="center">学生信息修改</td>
</tr>
<tr>
<td width="37%" align="right">班级:</td>
<td width="63%" align="left"><select size="1" name="user_class">
<%
sSql="select distinct classname from MajorInfo Group by Classname"
oRs.open sSql,oConn,3,2
do while not oRs.eof%>
<option value="<%=oRs("classname")%>" <%if stuclass=oRs("classname") then Response.write "selected"%>><%=oRs("classname")%></option>
<%oRs.movenext%>
<%loop%>
<%oRs.close%>
</select></td>
</tr>
<tr>
<td width="37%" align="right">学号:</td>
<td width="63%" align="left"><%=stuid%></td>
</tr>
<tr>
<td width="37%" align="right">姓名:</td>
<td width="63%" align="left"><input type="text" name="user_name" size="20" value="<%=stuname%>"></td>
</tr>
<tr>
<td width="37%" align="right">性别:</td>
<td width="63%" align="left"><input type="radio" value="男" <%if stusex="男" then Response.write "checked"%> name="user_sex">男
<input type="radio" <%if stusex="女" then Response.write "checked"%> name="user_sex" value="女">女</td>
</tr>
<tr>
<td width="37%" align="right">出生年月:</td>
<td width="63%" align="left"><input type="text" name="user_time" size="20" value="<%=stubirth%>">输入格式按标准输入</td>
</tr>
<tr>
<td width="100%" colspan="2">
<p align="center"><input type="submit" value="提交" name="B1"> <input type="reset" value="全部重写" name="B2"></td>
</tr>
</table>
</form>
</td>
</tr>
</table></center></div>
</td></tr></table>
<%Call DBConnEnd()%>
<!--#include file="..\CommonFile\pagefoot.asp"-->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -