📄 m_edit.asp
字号:
<!-- #include file="cookies.asp" -->
<script language="JavaScript">
function check()
{
if(document.form1.name.value == '')
{
window.alert('请输入名称');
document.form1.name.focus();
return false;
}
}
</script>
<!-- #include file="conn/conn.asp" -->
<%
table=trim(request("act"))
%>
<html>
<head>
<title>编辑信息</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../style/style.css" type="text/css">
<style type="text/css">
<!--
body {
background-color: #0099FF;
}
-->
</style></head>
<body text="#000000">
<div align="center"><b>编辑信息 </b></div>
<form name="form1" method="post" action="m_addsave.asp?edit=save&act=<%=trim(table)%>" onsubmit="return check();">
<table width="50%" border="0" align="center">
<%
set rs=nothing
set rs=server.createobject("adodb.recordset")
sql="select * from "&trim(table)&" where id='"&trim(request.querystring("id"))&"'"
rs.open sql,conn,1,1
if not rs.eof then
%>
<tr>
<td> 编 号:<%=trim(rs("id"))%>
<input type="hidden" name="id" size="16" maxlength="16" value="<%=trim(rs("id"))%>">
</td>
</tr>
<tr>
<td> 名 称:
<input type="text" name="name" size="50" maxlength="50" value="<%=trim(rs("name"))%>">
</td>
</tr>
<%if table="curricula" then%>
<tr><td>
<p>所属专业:
<% '动态显示专业
set rstype=createobject("adodb.recordset")
sql="select * from profession order by id"
rstype.Open sql,conn,1,1%>
<select name="pro">
<option value="<%=trim(rs("pname"))%>"><%=trim(rs("pname"))%></option>
<%do while not rstype.EOF%>
<option value="<%=rstype("name")%>"><%=rstype("name")%></option>
<%
rstype.MoveNext
loop
set rstype=nothing
%>
</select></p>
</td></tr>
<%end if%>
<tr>
<td> </td>
</tr>
<tr>
<td width="100%">
<input type="submit" name="Submit" value="保存">
<input type="button" name="Submit2" value="返回" onclick="window.close();"> </td>
</tr>
<%
end if
rs.close
set rs=nothing
%>
</table>
</form>
</body>
</html>
<%
conn.close
set conn=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -