⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 listcart.jsp

📁 该系统的主要功能是
💻 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&nbsp;${sessionScope.cart.cost}</font></td>
		</tr>
    </table>
    <input type="button" name="lookShoppingCart" value="继续购买图书" onclick="self.location='${pageContext.request.contextPath}/listBookStore.jsp'"/>&nbsp;&nbsp;
    <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 + -