📄 listcart.jsp
字号:
<%@ page language="java" import="java.util.*,com.briup.bean.*"
pageEncoding="UTF-8"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/c.tld" prefix="c"%>
<html>
<head>
<title>购物车列表</title>
</head>
<body>
<table align="center" border="1" bordercolor="FFDC75" cellpadding="3"
cellspacing="3">
<tr>
<th>
编号
</th>
<th>
书名
</th>
<th>
价格
</th>
<th>
数量
</th>
<th>
操作
</th>
</tr>
<!--struts标签库-->
<logic:iterate id="lis" name="list">
<html:form action="delOrderline">
<%--<form name="f1" method="post" action="/delOrderline">--%>
<html:hidden property="lineid" value="${lis.book.id}"></html:hidden>
<html:hidden property="num" value="${lis.num}" />
<tr>
<td align="center">
<bean:write name="lis" property="book.id" />
</td>
<td>
<bean:write name="lis" property="book.name" />
</td>
<td>
<bean:write name="lis" property="book.price" />
</td>
<td>
<html:text property="num1" value="${lis.num}" size="4"
maxlength="4" onblur="num.value = this.value;" />
</td>
<td align="center">
<html:submit property="Submit">
<bean:message key="list.submit" />
</html:submit>
<%--<html:button property="button" onclick="document.location='editOrderline'+${book.id}+'&num='+num.value">
<bean:message key="list.tslb" />
</html:button>
--%>
<input type="button" value="修改"
onclick="document.location='editOrderline.do?lineid='+${lis.book.id}+'&num='+num.value" />
</td>
</tr>
</html:form>
</logic:iterate>
<%--jsp标签库的的使用 --%>
<%--
<c:forEach var="lis" items="${list}">
<tr><td align="center">${lis.id}</td>
<td>66</td>
<td>${lis.book.name}</td>
</tr>
</c:forEach>--%>
<tr>
<td colspan="3" align="right">
<b>总计</b>
</td>
<td colspan="2">
<font color="red">RMB ${cart.cost}</font>
</td>
</tr>
</table>
<br>
<center>
<input type="button" onclick="document.location='clearCart.do'"
value="清空购物车">
<input type="button" onclick="document.location='listBookStore.jsp'"
value="继续购买">
<input type="button" onclick="document.location='order.jsp'"
value="提交订单">
</center>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -