📄 modify1.asp
字号:
<%
phonename=trim(request("phonename"))
phonenumber=trim(request("phonenumber"))
if phonename<>"" then
id=request("id")
Set conn=Server.CreateObject("ADODB.Connection")
DBPath1=server.mappath("../access.mdb")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath1
conn.Execute "update pubphone set phonename='" & phonename & "',phonenumber='" & phonenumber & "' where id=" & id
set conn=nothing
%>
<script language="javascript">
alert("数据信息修改成功!");
window.close();
window.opener.parent.frames("main").document.location ="index.asp";
</script>
<% else %>
<html>
<head>
<title>修改常用电话号码</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../css/eintrdemo.css">
</head>
<%
Set conn=Server.CreateObject("ADODB.Connection")
DBPath1=server.mappath("../access.mdb")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath1
set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from pubphone where id=" & request("id"),conn,3,1
%>
<body bgcolor="#efefef" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"
onload="javascript:document.form.phonename.focus()">
<form method="post" action="modify.asp" name="form">
<table width="100%" border="0" cellspacing="1" cellpadding="2">
<tr bgcolor="#4E5960">
<td class="heading"> <font color="#FFFFFF"><b>修改常用电话号码</b></font></td>
</tr>
</table>
<table width="100%" border="1" cellspacing="0" cellpadding="1" bordercolordark="#FFFFFF" bordercolor="#000000">
<tr>
<td width="12%" bgcolor="bfbfbf" valign="top">电话名称</td>
<td width="88%">
<input type="text" name="phonename" class="form" value="<%=trim(rs("phonename"))%>">
</td>
</tr>
<tr>
<td width="12%" bgcolor="bfbfbf" valign="top">电话号码</td>
<td width="88%">
<input type="text" name="phonenumber" class="form" value="<%=trim(rs("phonenumber"))%>">
</td>
</tr>
</table>
<div align="center"><br>
<input type="submit" value="修 改" name="B1" style="border-style: groove"> <input type="reset" value="恢 复" name="B2" style="border-style: groove">
<input type="button" value="关 闭" name="B3" onclick="javaScript:window.close()" style="border-style: groove"><br>
</div></form>
</body>
</html>
<% end if %>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -