📄 search.jsp
字号:
<%@page pageEncoding="UTF-8"%><%@ page session="true" %><html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>LIVE在线书店-书籍查询</title> </head> <body> <%@ include file="logo3.jsp" %> <%! String bookname,sele; java.util.Iterator c; %> <% response.setContentType("text/html;charset=GB2312"); request.setCharacterEncoding("GB2312"); bookname=(String)request.getParameter("bookname"); sele=(String)request.getParameter("select"); if(sele.equals("1")) { c = bookDB.serchbooks1(bookname); } if(sele.equals("2")) { c = bookDB.serchbooks2(bookname); } if(sele.equals("3")) { c = bookDB.serchbooks3(Integer.parseInt(bookname)); } mypack.BookDetails e=null; if(c.hasNext()) { while(c.hasNext()) { e=(mypack.BookDetails)c.next();%><table width="800" border="0" cellspacing="0" cellpadding="0" align="center"> <tr> <td width="120" rowspan="10" align="left" valign="top"><a href="<%=request.getContextPath()%>/bookdetails.jsp?bookId=<%=e.getBookId()%>"><img src="images/<%=e.getBookId()%>.jpg" width="80" height="90" border="0" ></a></td> <td><a href="<%=request.getContextPath()%>/bookdetails.jsp?bookId=<%=e.getBookId()%>"><b><%=e.getTitle()%></b></a></td> </tr> <tr> <td>作者 :<b><%=e.getName()%></b></td></tr> <tr> <td>市场价:<b><%=e.getPrice()%></b>元</td></tr> <tr><td> </td></tr> <tr> <td><strong><a href="<%=request.getContextPath()%>/catalog.jsp?Add=<%=e.getBookId()%>">加入购物车</a></strong> </td></tr> </table> <br> <br> <% } } else { %> <%="很抱歉,没有搜索到您要的内容"%> <% } %> </body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -