?? detail.jsp
字號:
<%@ page contentType="text/html; charset=gb2312" %>
<%@ page session="true" %>
<%@ page import="bookshop.book.book" %>
<%@ page import="bookshop.util.dataFormat" %>
<jsp:useBean id="book" scope="page" class="bookshop.run.op_book" />
<%
String mesg = "";
int Id=0;
if (request.getParameter("bookid")==null || request.getParameter("bookid").equals("")) {
mesg = "你要查看的圖書不存在!";
} else {
try {
Id = Integer.parseInt(request.getParameter("bookid"));
if (!book.getOnebook(Id)){
mesg = "你要查看的圖書不存在!";
}
} catch (Exception e){
mesg = "你要查看的圖書不存在!";
}
}
%>
<html>
<style type="text/css">
<!--
body {
background-color: #99CCFF;
}
-->
</style><head>
<title>零度書店在線 查看圖書資料</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="javascript">
function check()
{
if (document.form1.amount.value<1){
alert("你的購買數量有問題");
document.form1.amount.focus();
return false;
}
return true;
}
</script>
<link rel="stylesheet" href="books.css" type="text/css">
</head>
<body text="#000000" >
<div align="center">
<p>零度書店歡迎你<font color="#CC0066">選購圖書</font>!</p>
<% if(!mesg.equals("")){
out.println(mesg);
} else {
book bk = (book) book.getBooklist().elementAt(0);
%>
<table width="90%" border="0" cellspacing="2" cellpadding="1">
<form name="form1" method="post" action="buy.jsp">
<tr>
<td align="right" width="120">圖書名:</td>
<td><%= bk.getBookName() %></td>
</tr>
<tr>
<td align="right" width="120">作者:</td>
<td><%= bk.getAuthor() %></td>
</tr>
<tr>
<td align="right" width="120">所屬類別:</td>
<td><%= bk.getClassname() %></td>
</tr>
<tr>
<td align="right" width="120">出版社:</td>
<td><%= bk.getPublish() %></td>
</tr>
<tr>
<td align="right" width="120">書號:</td>
<td><%= bk.getBookNo() %></td>
</tr>
<tr>
<td align="right" width="120">書價:</td>
<td><%= bk.getPrince() %></td>
</tr>
<tr>
<td align="right" width="120">封面:</td>
<td ><img src="<%= bk.getPicture()%>" width="80" height="112"></td>
</tr>
<tr>
<td align="right" width="120" valign="top">內容介紹:</td>
<td><%= dataFormat.toHtml(bk.getContent()) %></td>
</tr>
<tr>
<td align="right" width="120" valign="top"> </td>
<td> </td>
</tr>
<tr>
<td align="right" width="120" valign="top">購買:</td>
<td>
<input type="text" name="amount" maxlength="5" size="3" value="1">
本</td>
</tr>
<tr>
<td align="right" width="120" valign="top"> </td>
<td>
<input type="hidden" name="bookid" value="<%=Id %>" >
<input type="submit" name="Submit" value="購買" onClick="return(check());">
<input type="reset" name="reset" value="取消">
</td>
</tr>
</form>
</table>
<% } %>
<br><p><a href="javascript:window.close()">關閉窗口</a></p>
<table width="100%" border="0" cellspacing="2" cellpadding="2">
<tr>
<td align="center">零度書店在線<br>
CopyRight@2007 陜西理工學院<br>
Email:<a href="mailto:shilei82@126.com">shilei82@126.com</a></td>
</tr>
</table>
</div>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -