?? showdelupdatebook.jsp
字號:
<%@ page language="java" import="java.util.*" pageEncoding="gb2312"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>ShowDelUpdateBook</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>
<a href = "AdminLogInSucceed.jsp">返回管理員首頁</a><br>
<%
Bean.BookQuery bookquery = new Bean.BookQuery();
ArrayList arraylist = bookquery.bookquery("");
if(arraylist == null)
{
System.out.println("目前書庫中還沒有存入圖書!");
}
else
{
Bean.BookBean book = null; //---這句話寫在這可以---
System.out.println("有圖書!");
%><table border="1">
<%
Iterator<Bean.BookBean> it = arraylist.iterator();
while(it.hasNext())
{
// Bean.BookBean user = null; //---這句話寫在這也可以---
book = it.next();
System.out.println(book.getBookID());
%>
<tr>
<td width="115" rowspan="3"><img src = "<%= book.getPicroot() %>" width = "100" height = "130"></td>
<td width="60" height="41">書號:</td>
<td width="175"><%=book.getBookID()%></td>
<td width="88">作者:</td>
<td colspan="3"><%= book.getAuthor() %></td>
</tr>
<tr>
<td height="52">書名</td>
<td><%= book.getBookName()%></td>
<td>價格:</td>
<td colspan="3"><%= book.getPrice()%></td>
</tr>
<tr>
<td>打折</td>
<td><%= book.getDiscount()%></td>
<td>出版社</td>
<td width="155"><%= book.getPress()%></td>
</tr>
<tr>
<td>數量:</td><td><%= book.getSum()%></td>
<td>
<form action = "/BookShop/Servlet/DelOrUpdate" name = "DelOrUpdate" method = "post">
<input type = "submit" name = "SubmitDelete" value = "Delete">
<input type = "submit" name = "SubmitUpdate" value = "Update">
<input type = "hidden" name = "bookID" value = "<%=book.getBookID()%>">
</form>
</td>
</tr>
<%
}
}
%>
</table>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -