?? bookdetails.jsp
字號:
<%@ page import="java.util.*" %>
<%@ page contentType="text/html; charset=GB2312" %>
<%@ page session="true" %>
<html>
<head><title>TitleBookDescription</title></head>
<%@ include file="logo3.jsp" %>
<body>
<br>
<%
//Get the identifier of the book to display
String bookId = request.getParameter("bookId");
if(bookId==null||bookId.endsWith(" "))bookId="001";
BookDetails book = bookDB.getBookDetails(bookId);
%>
<%
if(book==null)
{
%>
<p>書號"<%=bookId%>"在數據庫中不存在<p>
<strong><a href="<%=request.getContextPath()%>/catalog.jsp">繼續購物</a></strong>
<%
return;
}
%>
<table width="700" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="120" rowspan="20" align="left" valign="top"><img src="images/<%=book.getBookId()%>.jpg" width="80" height="90" border="0" ></td>
<td><b><%=book.getTitle()%></b></td>
</tr>
<tr>
<td>作者 :<b><%=book.getName()%></b> (<%=book.getYear()%>)</td></tr>
<tr> <td>市場價:<b><%=book.getPrice()%></b>元</td></tr>
<tr><td>銷售數量:<%=book.getSaleAmount()%></td></tr>
<tr><td>評論:<%=book.getDescription()%></td></tr>
<tr><td><center><strong><a href="<%=request.getContextPath()%>/catalog.jsp?Add=<%=bookId%>">加入購物車</a>
<a href="<%=request.getContextPath()%>/catalog.jsp">繼續購物</a></strong></center></td></tr>
</table>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -