?? listcart.jsp
字號:
<%@page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ taglib uri="/WEB-INF/c.tld" prefix="c"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>購物車</title>
<script type="text/javascript" src="js/common.js"></script>
</head>
<body><center>
<c:if test="${empty sessionScope.cart.orderlines}">
<c:redirect url="/listBookStore.jsp"></c:redirect>
</c:if>
<table border="0" bgcolor="FFDC75" width="100%" align="center" >
<tr>
<td><h3 align="center">購物車</h3></td>
</tr>
</table>
<table border="1" align="center" bordercolor="FFDC75" cellpadding="3" cellspacing="3">
<tr>
<th><h3 align="center">書名</h3></th>
<th><h3 align="center">單價</h3></th>
<th><h3 align="center">數量</h3></th>
<th><h3 align="center">操作</h3></th>
</tr>
<c:forEach var="sxd" items="${sessionScope.cart.orderlines}">
<form name="f1" method="post">
<tr>
<td>${sxd.book.name }</td>
<td>${sxd.book.price }</td>
<td><input type="text" name="num" value="${sxd.num }" size="4" maxlength="4" onblur="isInteger(this.value)"/></td>
<td><input type="button" name="modify" value="修改" onclick="document.location='editorderline.do?lineid='+${sxd.book.id}+'&num='+num.value"/>
<input type="button" name="delete" value="刪除" onclick="document.location='delorderline.do?lineid='+${sxd.book.id}"/>
</td>
</tr>
</form>
</c:forEach>
<tr>
<td colspan="3" align="right"><b>總計</b></td>
<td colspan="2"><font color="red">RMB ${sessionScope.cart.cost}</font></td>
</tr>
</table>
<input type="button" name="lookShoppingCart" value="繼續購買圖書" onclick="self.location='${pageContext.request.contextPath}/listBookStore.jsp'"/>
<input type="button" name="" value="清空購物車" onclick="document.location='clearorderline.do'"/>
<input type="button" name="lookOrder" value="提交訂單" onclick="self.location='${pageContext.request.contextPath}/order.jsp'"/>
</center></body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -