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

📄 book_info.jsp

📁 网站的实例
💻 JSP
字号:
<%@ include file="data.jsp"%>
<jsp:useBean class="ebs.Buyercar" id="buy" scope="session"/>
<SCRIPT language="JavaScript">

function openwin(str)
{    window.open("addcart.jsp?bid="+str,"shoppingcart",width=300,height=200,resizable=1,scrollbar=2);
     return;
}

</SCRIPT>
<html>
<head>
<title>图书详细信息</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css/css1.css" rel="stylesheet" type="text/css">
</head>
<%
String id=request.getParameter("id").trim();
String sql1="UPDATE book_info SET book_click=book_click+1 WHERE book_id="+id;
Stmt.executeUpdate(sql1);
String sql2="SElECT * FROM book_info WHERE book_id="+id;
Rst=Stmt.executeQuery(sql2);
if(!Rst.next())
{
	out.print("There is not this book's detail!");
}
else
{
  	String bookname=Rst.getString("book_name");
  	String author=Rst.getString("book_author");
  	String pub=Rst.getString("book_pub"); 
  	String pubdate=Rst.getString("book_pubdate");
  	String edit=Rst.getString("book_edit");
  	String isbn=Rst.getString("book_isbn");
  	String pages=Rst.getString("book_pages"); 
  	String app=Rst.getString("book_app");
  	String price=Rst.getString("book_price"); 
  	String pic=Rst.getString("book_pic"); 
  	String intro=Rst.getString("book_intro");
  	String bookclick=Rst.getString("book_click");  	
  	bookname=new String(bookname.getBytes("GB2312"),"8859_1");
  	author=new String(author.getBytes("GB2312"),"8859_1");
  	pub=new String(pub.getBytes("GB2312"),"8859_1"); 
  	intro=new String(intro.getBytes("GB2312"),"8859_1");

%>
<body>
<p align="center" class="title">图书详细信息 </p>
<p><a href="index.jsp" class="link">返回首页</a></p>
<p>书名:<%=bookname%></p>
<p>作者:<%=author%></p>
<p>出版社:<%=pub%></p>
<p>出版日期:<%=pubdate%></p>
<p>版本号:<%=edit%></p> 
<p>书号:<%=isbn%></p> 
<p>页数:<%=pages%></p>
<p>开本:<%=app%></p>
<p>售价:¥<%=price%></p>
<p>图片:<img src="../pic/bookapp/<%=pic%>"></p>
<p>图书介绍:<%=intro%></p>
<p>点击数:<%=bookclick%></p> 
<%
}
Rst.close();
Stmt.close();
Conn.close();
%>
<p><a href='Javascript:openwin("<%=request.getParameter("id")%>")' class="link"> 
  加入购物车 </a> <a href="shoppingcart.jsp"> &nbsp;&nbsp;<span class="link">查看购物车</span> 
  </a></p>
</body>
</html>

⌨️ 快捷键说明

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