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

📄 book_info.jsp

📁 这是个简单的在线书店购书系统
💻 JSP
字号:
<%@ page language="java" import="java.util.*,mypack.*" 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>My JSP 'book_info.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">
	-->

  <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
body,td,th {
	font-size: 18px;
}
-->
</style>

</head>
  
  <body>
  <jsp:useBean id="bookdb" class="mypack.BookDB" scope="session"/>
 
    <%
    String id=request.getParameter("id");
    BookBean book=bookdb.getBook(id);
    if(book!=null){%>
   
    
   
<table width="560" height="457" border="1" align="center" cellspacing="0" bordercolor="#C2F7B9" bgcolor="#FFFFCC" >
  <tr>
    <td height="39" colspan="3" align="center"> <span class="STYLE1">图书详细信息</span></td>
  </tr>
  <tr>
    <td width="140" rowspan="5" align="center">&nbsp;</td>
    <td width="136" height="34" align="center">【图书名称】</td>
    <td width="270" align="center"><%=book.getBookname() %></td>
  </tr>
  <tr>
    <td height="36" align="center">【图书出版社】</td>
    <td align="center"><%=book.getPub() %></td>
  </tr>
  <tr>
    <td height="35" align="center">【作者】</td>
    <td align="center"><%=book.getAuthor() %></td>
  </tr>
  <tr>
    <td height="35" align="center">【价格】</td>
    <td align="center"><%=book.getPrice() %></td>
  </tr>
  <tr>
    <td height="41" align="center">【图书类别】</td>
    <td align="center"><%=book.getSortname() %></td>
  </tr>
  <tr>
    <td height="50" align="center">【图书简介】</td>
    <td colspan="2" align="center"></td>
  </tr>
  <tr>
    <td height="146" colspan="3" align="center" valign="middle"><table width="448" height="127" border="0" cellspacing="0" align="center">
      <tr>
        <td width="398" align="left" valign="top" bordercolor="#C9F5B4"><%=book.getIntro() %></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="39" colspan="3" align="left" valign="middle"><a href="book_car.jsp?id=<%=book.getBookid() %>">添加到购物车</a></td>
  </tr>
</table>
<%} else{
    out.println("暂无此书");
    
    } %>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -