?? viewcart.jsp
字號:
<%@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"%>
<%@page contentType="text/html; charset=GBK"%>
<html:html>
<head>
<title>購物車</title>
<script language="JavaScript" type="text/javascript" >
function doDifferent(obj)
{
document.shoppingForm.event.value= obj;
document.shoppingForm.submit();
}
</script></head>
<body>
<html:form action="/shoppingAction.do" method="POST">
<html:hidden property="event" value="save"/>
<table width="100%" border="0" align="center">
<tr>
<td bgcolor="#EEEEEE">
<div align="center"> 購物車
<table border="1">
<tr>
<td>商品名稱</td>
<td>商品描述</td>
<td>單價</td>
<td>數量</td>
<td>小計</td>
<td colspan="2">操作</td>
</tr>
<logic:iterate id="item" name="shoppingForm" property="cart">
<tr>
<td>
<bean:write name="item" property="product.name"/>
</td>
<td>
<bean:write name="item" property="product.note"/>
</td>
<td>
<bean:write name="item" property="product.price" format="####.##"/>
</td>
<td>
<bean:write name="item" property="quantity" format="####"/>
</td>
<td>
<bean:write name="item" property="itemPrice" format="####.##"/>
</td>
<td>
<a href="shoppingAction.do?event=removeproduct&productId=<bean:write name="item" property="product.productId" />">刪除</a>
</td>
</tr>
</logic:iterate>
</table>
<tr align="right">
<td>合計:</td>
<td>
<bean:write name="shoppingForm" property="cart.totalPrice" format="####.##"/>
</td>
</tr>
</div>
</td>
</tr>
</table>
<div align="center">
<html:button property="" value="繼續購物" onclick="doDifferent('')"/>
<html:button property="" value="結帳" onclick="doDifferent('checkout')"/>
</div>
</html:form>
</body>
</html:html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -