📄 balance_sell.jsp
字号:
<script language="JavaScript">
<!--
function CheckForm()
{
if(document.form.pro_id.value=="")
{
alert("请输入商品编号");
document.form.pro_id.focus();
return false;
}
if(document.form.pro_id.value.match(/^[1-9]\d*$/)==null)
{
alert("商品编号应为数字");
document.form.pro_id.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!=2&&login.dept!=5)
{
%>
<jsp:forward page="index.jsp"/>
<%
}
%>
<jsp:useBean id="pro_array" scope="session" class="bb.pro_array" />
<h1 align="center">结算</h1>
<%
String pro_id=request.getParameter("pro_id");
int l=pro_array.getI();
pro_array.products[l]=pro_id;
pro_array.setI();
%>
<hr>
<table align="center"width="500"border="1">
<tr><form name="form"method="post"action="balance_sell.jsp">
<P>
商品编号:
<input type="text"name="pro_id">
</P>
<input type="submit"name="submit" value="确定"style="CURSOR: hand"onClick="return CheckForm();">
</form>
<%
if(pro_array.getI()==1)
{
%>
<script language="JavaScript">
<!--
function CheckForm1()
{
if(document.form.pro_id.value=="")
{
alert("请输入商品编号");
document.form.pro_id.focus();
return false;
}
}
// -->
</script>
<%
}
%>
<a href="balance_do_sell.jsp"onClick="return CheckForm1();">提交</a>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -