📄 cart.jsp
字号:
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="IncludeHeader.jsp"%>
<html>
<head>
<title>网上书店</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<link rel="stylesheet" type="text/css" href="<html:rewrite page="/style.css"/>">
</head>
<body>
<div class="content">
<%@ include file="IncludeTop.jsp"%>
<div class="cart">
<logic:equal name="cartForm.cart.numberOfItems" value="0">
您还没有选中书
</logic:equal>
<html:form action="/cartAction">
<table border="0" width="100%">
<tr class="tr_head">
<td>书号</td>
<td>售价</td>
<td>折扣</td>
<td>折后价格</td>
<td>数量</td>
<td>操作</td>
</tr>
<logic:present name="cartForm">
<logic:iterate id="item" collection="${ cartForm.cart.cartItemList.pageList }">
<tr>
<td>${item.item.itemId}</td>
<td>${item.item.baseprice}</td>
<td>${item.item.discount*100}%</td>
<td>${item.totalPrice}</td>
<td><input type="text" name="quantity_${item.item.itemId}" value="${item.quantity}"/>
</td>
<td>
<input type="button" class="normalButton" value="删除"
onclick="window.location.href='<html:rewrite page="/cartAction.do?method=removeItem&itemId=${item.item.itemId}"/>'" />
</td>
</tr>
</logic:iterate>
</logic:present>
<tr>
<td colspan="6" align=right>
合计:${cartForm.cart.subTotal}
</td>
</tr>
<tr>
<td colspan="6" align=right>
<html:submit value="更新数量" styleClass="normalButton"></html:submit>
<input type="button" class="normalButton" value="结帐"
onclick="window.location.href='<html:rewrite page="/cartAction.do?method=checkout"/>'" />
<input type="button" class="normalButton" value="继续购物"
onclick="window.location.href='<html:rewrite page="/index.do"/>'" />
</td>
</tr>
</table>
<input type="hidden" name="method" value="updateQuantity"/>
</html:form>
</div>
<%@ include file="IncludeBottom.jsp"%>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -