edit.asp
来自「ASP编程实例入门与提高书中的实例源代码」· ASP 代码 · 共 43 行
ASP
43 行
<html>
<head>
<title>编辑数据</title>
</head>
<body bgcolor="#FFFFFF">
编辑数据,然后提交:
<%
myDSN="DSN=pubs;user id=sa;pwd=123"
set conntemp=server.createobject("adodb.connection")
conntemp.open myDSN
form_ID=request.querystring("which")
sqltemp="select * from authors "
sqltemp=sqltemp & " where AU_ID='" & form_id &"'"
set rstemp=conntemp.execute(sqltemp)
form_auID=rstemp("AU_ID")
form_author=rstemp("au_fname")
form_address=rstemp("address")
rstemp.close
set rstemp=nothing
conntemp.close
set conntemp=nothing
%>
<body>
<form name="myauthor" action="editdo.asp" method="POST">
<input type="hidden" name="id" value="<%=form_auid%>">
<p>Author ID: <%=form_auid%></p>
<p> Author Name:
<input type="TEXT" name="name" value="<%=form_author%>"></p>
<p> Year Born:
<input type="TEXT" name="address" value="<%=form_address%>"></p>
<p> <input type="SUBMIT" value="提交"> </p>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?