checksuborder.jsp
来自「本系统为符合订单管理 精确使用了账号分层用户管理 可进行主订单 次订单的增加 删」· JSP 代码 · 共 83 行
JSP
83 行
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<jsp:include page="../header.jsp" />
<html>
<head>
<title>检查您所订购的商品</title>
<script language="JavaScript1.2">
function isSelectRow(choose){//check one row is select
var count=0;
ch=document.getElementsByName(choose);
for(i=0;i<ch.length;i++){
if(ch[i].checked==false){
count++;
}
}
if(count==ch.length){
alert('请至少选择一行');
return false;
}
}
function addSubOrder1(){
if(isSelectRow('wareIds')==false){
return false;
}
document.forms[0].state.value="1";
document.forms[0].submit();
}
function addSubOrder2(){
if(isSelectRow('wareIds')==false){
return false;
}
document.forms[0].state.value="2";
document.forms[0].submit();
}
</script>
</head>
<body>
<html:form action="/checkSubOrder.do" method="post">
<center>确认您订购的商品</center>
<html:hidden property="state"/>
<table border="1" align="center">
<tr>
<th>确认</th>
<th>商品名称</th>
<th>商品产地</th>
<th>商品单价</th>
<th>商品描述</th>
<th>订购数量</th>
</tr>
<logic:present name="wareList">
<logic:iterate id="WareForm" name="wareList">
<tr>
<td>
<html:multibox property="wareIds">
<bean:write name="WareForm" property="wareId"/>
</html:multibox>
</td>
<td><bean:write name="WareForm" property="wareName"/></td>
<td><bean:write name="WareForm" property="warePlace"/></td>
<td><bean:write name="WareForm" property="price"/></td>
<td><bean:write name="WareForm" property="present"/></td>
<td><input type="text" name="<bean:write name='WareForm' property='wareId'/>"/></td>
</tr>
</logic:iterate>
</logic:present>
<tr>
<th colspan="6">
<html:button property="button" value="提交付款" onclick="addSubOrder1()"/>
<html:button property="button" value="稍后付款" onclick="addSubOrder2()"/>
<html:reset value="重置"/>
</th>
</tr>
</table>
</html:form>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?