?? checksuborder.jsp
字號:
<%@ 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 + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -