📄 updata.asp
字号:
<HTML><HEAD>
<LINK href="style.css" rel=stylesheet type=text/css>
<%
id=Request.QueryString("id")
set conn=server.createobject("ADODB.Connection")
filepath=server.mappath("db.mdb")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & filepath
Set RS = SERVER.CreateObject("ADODB.Recordset")
strSQL = "SELECT * FROM music where id=" & Cint(id)
RS.Open strSQL,conn,1,3
if Request.ServerVariables("Request_Method")="POST" then
RS("name")=trim(Request.Form("name"))
RS("song")=trim(Request.Form("song"))
RS("url")=trim(Request.Form("url"))
RS("error")=false
RS.update
RS.close
Set RS=nothing
conn.close
Set conn=nothing
Response.write ("操作成功,谢谢!")
Response.end
end if
%>
<title>修改歌曲信息</title>
</HEAD>
<BODY leftMargin=0 topMargin=0>
<br>
<center>
<form method="POST" name="form2">
<table border="0" width="400" cellpadding="0" cellspacing="0">
<tr>
<td>歌手名</td>
<td width="300">
<input type="text" name="name" size="40" value="<%=RS("name")%>"></td>
</tr>
<tr>
<td>歌曲名</td>
<td>
<input type="text" name="song" size="40" value="<%=RS("song")%>"></td>
</tr>
<tr>
<td>歌曲地址</td>
<td><input type="text" name="url" size="40" value="<%=RS("url")%>"></td>
</tr>
<tr>
<td><a href="http://mp3.baidu.com/m?tn=baidump3&ct=134217728&rn=&word=<%=RS("name")%>+<%=RS("song")%>&lm=0" target="baidu">[MP3地址]</a></td><td><input type="submit" name="Submit1" value="提交"> <input type="reset" name="Submit2" value="重 置">
</td>
</tr>
</table>
</form>
</center>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -