📄 customer_edit.asp
字号:
<!--#include file="Conn.asp"-->
<!--#include file="Check.asp"-->
<%
Dim cc,id
Dim ke_id,ke_cus,ke_lev,ke_add,ke_tel,ke_mone,ke_lx
id=Request("id")
Set cc = Conn.Execute("Select Customer_ID,Customer,LianXi,Levels,Address,Telphone,Mone From [Customer] Where ID="&id)
ke_id = cc(0)
ke_cus = cc(1)
ke_lx = cc(2)
ke_lev = cc(3)
ke_add = cc(4)
ke_tel = cc(5)
ke_mone = cc(6)
cc.Close
Ser cc=Nothing
%>
<html>
<head>
<title>管理中心</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="Image/style.css" type=text/css rel=stylesheet>
<script language="JavaScript" src="Image/js.js"></SCRIPT>
</head>
<script language="JavaScript">
<!--
function change(obj,i) {
he=parseInt(obj.style.height);
if (he>=80&&he<=400)
obj.style.height=he+i+'px';
else
obj.style.height='80px';
}
function chk(theForm){
if (theForm.kehu_id.value == ""){
alert("请输入客户编号!");
theForm.kehu_id.focus();
return (false);
}
if (theForm.kename.value == ""){
alert("请输入客户名称!");
theForm.kename.focus();
return (false);
}
if (theForm.selkelev.value == ""){
alert("请输入级别!");
theForm.selkelev.focus();
return (false);
}
if (theForm.tel.value == ""){
alert("请输入电话!");
theForm.tel.focus();
return (false);
}
if (theForm.address.value == ""){
alert("请输入地址!");
theForm.address.focus();
return (false);
}
if (theForm.mone.value == ""){
alert("请输入备注!");
theForm.mone.focus();
return (false);
}
}
//-->
</script>
<body text="#000000">
<table cellpadding="2" cellspacing="1" border="0" width="95%" class="tableBorder" align=center>
<form action="Customer_Edit2.asp?id=<%=id%>" method=post id=form1 name=form1 onSubmit="return chk(this)">
<tr bgcolor=ffffff>
<th height=25 colspan=3 align="center">修改客户资料</th>
</tr>
<tr bgcolor=ffffff>
<td width="30%" class=forumrow><div align="right">客户编号:</div></td>
<td colspan="2" class=forumrow> <input name="kehu_id" type="text" id="kehu_id2" value="<%=ke_id%>" size="15" maxlength="20" readonly>
</td>
</tr>
<tr bgcolor=ffffff>
<td width="30%" class=forumrow><div align="right">客户名称:</div></td>
<td colspan="2" class=forumrow><input name="kename" type="text" id="kename2" value="<%=ke_cus%>" size="25" maxlength="30"></td>
</tr>
<tr bgcolor=ffffff>
<td class=forumrow><div align="right">级别:</div></td>
<td colspan="2" class=forumrow> <select name="selkelev" id="select">
<%
Dim kl
Set kl = Conn.execute("Select Customer_Levels From [Customer_Level]")
Do While Not kl.Eof
If kl(0)=ke_lev Then
Response.Write "<option value='"&kl(0)&"' selected>" &kl(0)& "级</option>"
Else
Response.Write "<option value='"&kl(0)&"'>" &kl(0)& "级</option>"
End if
kl.MoveNext
Loop
kl.Close
Set kl=Nothing
%>
</select></td>
</tr>
<tr bgcolor=ffffff>
<td class=forumrow><div align="right">联系人:</div></td>
<td colspan="2" class=forumrow><input name="lianxi" type="text" id="lianxi" value="<%=ke_lx%>" size="20" maxlength="20"></td>
</tr>
<tr bgcolor=ffffff>
<td class=forumrow><div align="right">电话:</div></td>
<td colspan="2" class=forumrow> <input name="tel" type="text" id="tel2" onKeyPress="javascript:CheckNum();" value="<%=ke_tel%>" size="15" maxlength="20"></td>
</tr>
<tr bgcolor=ffffff>
<td class=forumrow><div align="right">地址:</div></td>
<td colspan="2" class=forumrow><input name="address" type="text" id="address2" value="<%=ke_add%>" size="50"></td>
</tr>
<tr bgcolor=ffffff>
<td class=forumrow><div align="right">备注:</div></td>
<td colspan="2" class=forumrow><textarea name="mone" cols="50" rows="10" id="mone"><%=ke_mone%></textarea></td>
</tr>
<tr bgcolor=ffffff>
<td class=forumrow> </td>
<td width="37%" class=forumrow> </td>
<td width="33%" class=forumrow><a href="javascript:change(document.all.mone,-50)"><img src="Image/minus.gif" alt="缩小文本框" width="20" height="20" border="0"></a>
<a href="javascript:change(document.all.mone,50)"><img src="Image/plus.gif" alt="放大文本框" width="20" height="20" border="0"></a></td>
</tr>
<tr bgcolor=ffffff>
<td colspan="3" align="center" class=forumrow> <input type="submit" name="Submit" value="修 改">
<input type="reset" name="Submit2" value="清 空"></td>
</tr>
</form>
</table>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -