📄 catlist.jsp
字号:
<%@ page language="java"
import="java.util.*,com.shop.vo.addbook.*,com.shop.model.dao.addbook.*"
contentType="text/html; charset=GB2312"%>
<jsp:directive.page import="com.shop.controller.Cat" />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>My JSP 'catList.jsp' starting page</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="styles.css">
-->
</head>
<body background="<%=request.getContextPath()%>/image/leftbg.jpg">
<center><font color="red" size="14"><%=request.getAttribute("info")==null?"":request.getAttribute("info") %></font></center><br>
<center><font size="5" color="#0000ff" align="center">您的购物车信息</font></center>
<form method="post"
action="<%=request.getContextPath()%>/servlet/CatBookRemoveServlet"
name="catlistform" style="">
<p>
</p>
<table width="80%" border="1" align="center" bgcolor="#0080ff">
<tbody>
<tr>
<td>
</td>
<td>
书名
</td>
<td>
库存量
</td>
<td>
销售价
</td>
<td>
作者
</td>
<td>
总价格
</td>
<td>
购买数量
</td>
</tr>
<% request.getSession().setAttribute("userid",100);
List<BookInfoVo> bookList = (List<BookInfoVo>) request.getSession()
.getAttribute("bookList");
if (bookList != null) {
for (BookInfoVo book : bookList) {
%>
<tr>
<td>
<input type="checkbox" name="id" value="<%=book.getIsbn()%>">
</td>
<td>
<%=book.getBookName()%>
</td>
<td>
<%=book.getRemainNumber()%>
</td>
<td>
<%=book.getSellPrice()%>
</td>
<td>
<%=book.getAuthor()%>
</td>
<td>
<%=book.getCountPrice() %>
</td>
<td>
<%=book.getBuyCount()%>
</td>
</tr>
<%
}
%>
<tr>
<td colspan="3">
<input type="submit" name="remove" value="删除">
</td>
<td colspan="2">
<input type="button" name="goback" value="返回"
onclick="location.href='<%=request.getContextPath()%>/servlet/AddBookServlet'">
</td>
<td colspan="2">
<input type="button" name="goback" value="购买以上所列书籍"
onclick="location.href='<%=request.getContextPath()%>/servlet/BuyBookServlet'">
</td>
<tr>
<%
} else {
%>
<tr>
<td colspan="3">
</td>
<td colspan="4">
<input type="button" name="goback" value="返回"
onclick="location.href='<%=request.getContextPath()%>/servlet/AddBookServlet'">
</td>
</tr>
<%
}
%>
</tbody>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -