📄 existproductadd.jsp
字号:
<script language="JavaScript">
<!--
function CheckForm()
{
if(document.form2.pro_id.value=="")
{
alert("请输入物品编号");
document.form2.pro_id.focus();
return false;
}
if(document.form2.pro_id.value.match(/^[1-9]\d*$/)==null)
{
alert("物品编号应为数字");
document.form2.pro_id.focus();
return false;
}
if(document.form2.pro_id.value.length>10)
{
alert("输入的编号太大!");
document.form2.pro_id.focus();
return false;
}
if(document.form2.quantity.value=="")
{
alert("请输入数量");
document.form2.quantity.focus();
return false;
}
if(document.form2.quantity.value.match(/^[1-9]\d*$/)==null)
{
alert("数量输入应为数字");
document.form2.quantity.focus();
return false;
}
if(document.form2.quantity.value.length>10)
{
alert("输入的数量太大!");
document.form2.quantity.focus();
return false;
}
}
// -->
</script>
<%@ page language="java" contentType="text/html; charset=gb2312"
pageEncoding="gb2312"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>添加已有货物</title>
</head>
<body>
<jsp:useBean id="login" scope="session" class="bb.login" />
<%if(login.dept!=1&&login.dept!=5)
{
%>
<jsp:forward page="index.jsp"/>
<%
}
%>
<h1 align="center">添加已有货物</h1>
<hr>
<table align="center"width="500"border="1">
<tr>
<form name="form2"method="post"action="existProductAdd_do.jsp">
<P>
商品编号:
<input type="text"name="pro_id">
</P>
<p>进货数量:
<input type="text"name="quantity">
</P>
<p>
<input type="submit"name="submit"style="CURSOR: hand" value="提交" onClick="return CheckForm();">
<input type="reset"name="reset"value="重置">
</P>
</form>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -