?? category.jsp
字號:
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@ page import="java.sql.*" %>
<%@ page import="Model.DataOperation" %>
<%--
The taglib directive below imports the JSTL library. If you uncomment it,
you must also add the JSTL library to the project. The Add Library... action
on Libraries node in Projects view can be used to add the JSTL 1.1 library.
--%>
<%--
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
--%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Categorymath</title>
</head>
<body>
<table width="604" height="240">
<jsp:useBean id="DataOperation" class="Model.DataOperation" scope="page"/>
<%
String CategoryID=request.getParameter("CategoryID");
Connection con =DataOperation.getConnection();
Statement st=con.createStatement();
ResultSet rs=st.executeQuery("select * from Book where CategoryID='"+CategoryID+"'");
%>
<%
while(rs.next()){
%>
<tr>
<td bgcolor="#0099CC" width="315">
<p align="center"><b>
<font face="Tahoma" color="#008000">
<br>
<br>
book title
<br>
<br>
</font></b></td>
<td bgcolor="#0099CC">
<font color="#008000">
<%
String title=rs.getString("Title");
out.println(title);
%>
</font>
</td>
</tr>
<tr>
<td width="315" height="26">
<p align="center"><font face="Tahoma">Price </font>
</td>
<td height="26">
<%
double price=rs.getDouble("price");
out.println(price);
%>
</td>
</tr>
<tr>
<td width="315" height="44">
<p align="center"><font face="Tahoma">Date of
Publication </font>
</td>
<td height="44">
<%
Date date=rs.getDate("PublicationDate");
out.println(date);
%>
</td>
</tr>
<tr>
<td width="315" height="75">
<form action="ShowDetals.jsp" method=post>
<p align="center">
<font size="3">
<input type="hidden" value=<%=rs.getString("ISBN")%> name="ISBN">
<input type="submit" value="detals"></font>
</p>
</form>
</p>
</td>
<td height="75">
<form method="post" action="BuyController">
<p align="center"><font size="3">
<input type="submit" value="Buy"></font>
<font size="3">
<input type="hidden" name="image" value=<%=rs.getString("image")%>>
<input type="hidden" name="ISBN" value=<%=rs.getString("ISBN")%>>
<input type="hidden" name="Price"value=<%=rs.getDouble("price")%> >
<input type="hidden" name="Title"value=<%=rs.getString("Title")%> >
</font></p>
</form> </p>
</td>
</tr>
<%}%>
<hr/>
</table>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -