📄 color_add.asp
字号:
<!--#include file="../conn.asp"-->
<%
ckadd=douhao(trim(request("ckadd")))
color_name=douhao(trim(request("color_name")))
'meno=douhao(trim(request("meno")))
if ckadd<>"" then
set rs=server.createobject("adodb.recordset")
rs.open "select * from ht_color where color_name='"&color_name&"'",conn,1,1
if not rs.eof then
response.write "<script language='javascript'>alert('该记录已存在!请不要重复添加!');history.back();</script>"
response.end
else
end if
rs.close
set rs=nothing
end if
if ckadd="确定" then
if color_name="" then
response.write "<script>alet('颜色名不能为空');history.go(-1);</script>"
response.end
end if
conn.execute "insert into ht_color (color_name) values ('"&color_name&"')"
response.write "<script language='javascript'>window.opener.location.href = window.opener.location.href;window.close();</script>"
elseif ckadd="新增" then
if color_name="" then
response.write "<script>alet('颜色名不能为空');history.go(-1);</script>"
response.end
end if
conn.execute "insert into ht_color (color_name) values ('"&color_name&"')"
response.write "<script language='javascript'>window.opener.location.href = window.opener.location.href;</script>"
end if
%>
<html>
<head>
<title>基础资料维护--产品颜色</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../css/body.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="00" marginwidth="0" marginheight="0">
<table width="100%" height="156" border="0" cellspacing="0">
<tr>
<td height="156" class="borderon">
<form action="color_add.asp" method="post" name="ck" id="ck">
<table width="266" height="86" border="0" align="center">
<tr>
<td width="27%" height="40">产品颜色:</td>
<td width="50%"><input name="color_name" type="text" id="color_name" size="15"></td>
<td width="23%"><div align="center">
<input name="ckadd" type="submit" id="ckadd" onClick="javascript:return check();" value=" 确定 ">
</div></td>
</tr>
<tr>
<td height="40">说 明:</td>
<td><input name="meno" type="text" id="meno2" value="" size="15"></td>
<td><div align="center">
<input name="ckadd" type="submit" id="ckadd" onClick="javascript:return check();" value=" 新增 ">
<script language="JavaScript">
function check(){
if (document.ck.color_name.value==''){
alert('请输入产品颜色!');
document.ck.color_name.focus();
return false;
history.back();
}
return true;
}
</script>
</div></td>
</tr>
</table>
</form></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -