📄 o_newinput.asp
字号:
<!-- #include File="../../inc/imis.inc"-->
<%
if request("pagename")="donewinput" then
set rs=server.createobject("ADODB.Recordset")
sql="select * from office_setup where name='"&request("name")&"'"
rs.open sql,source,3,3
if not rs.eof then
%>
<script language=javascript>
alert("已有同名物品,请查正!");
window.close();
</script>
<%
response.end
else
if request("name")<>"" then
rs.addnew
rs("name")=request("name")
else
%>
<script language=javascript>
alert("品名不能为空!");
window.history.go(-1);
</script>
<%
response.end
end if
rs("price")=request("price")
rs("unit")=request("unit")
rs("brief")=request("brief")
rs.update
rs.close
%>
<script language=javascript>
alert("已成功增加了新办公用品!");
window.opener.location.reload();
window.location="o_newinput.asp";
</script>
<%
end if
end if
%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>办公用品</title>
<LINK href="../../<%=session("color")%>.css" rel=stylesheet type=text/css>
<script language="JavaScript">
function amsub(form)
{
if(form.name.value=="")
{
alert("请输入办公用品名!");
return false;
}
if (form.unit.value=="")
{ alert("请输入该用品单位!");
return false;
}
return true;
}
</script>
</head>
<body class="L2" topmargin="0">
<form method="post" action="o_newinput.asp" name="form1" onsubmit="return amsub(this)">
<br>
<table width="96%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td colspan="4" align="center">添加办公用品(价格单位:元)</td>
</tr>
<tr>
<td align="right">品名:</td>
<td>
<input type="text" name="name" size="20" maxlength="20">
</td>
</tr>
<tr>
<td align="right">单位:</td>
<td>
<input type="text" name="unit" size="20" maxlength="20">
</td>
</tr>
<tr>
<td align="right">单价:</td>
<td>
<input type="text" name="price" size="20" maxlength="20">
</td>
</tr>
<tr>
<td align="right">备注:</td>
<td>
<textarea name="brief" cols="20" rows="4"></textarea>
</td>
</tr>
<tr>
<td colspan="4" align="center" height="50">
<input type="submit" name="Submit" value="确定添加">
<input type="hidden" name="pagename" value="donewinput">
<input type="button" name="wcl" value="关闭窗口" onclick="window.close()">
</td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -