📄 search.jsp
字号:
<<%--
Struts网上商城使用版本 BY GTON WEB:www.98202.com QQ:27612285
需要完整版请联系本人
--%>
%@page contentType="text/html; charset=GBK"%>
<%@page contentType="text/html; charset=GBK"%>
<%@taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x"%>
<html:html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="javascript">window.open('http://www.98202.com');</script>
<title>商城高级搜索</title>
<link href="/shop/img/css.css" type="text/css" rel="stylesheet">
</head>
<body>
<table cellspacing="0" cellpadding="0" width="770" align="center" border="0">
<tr>
<td>
<jsp:include flush="false" page="top.jsp"/>
</td>
</tr>
</table>
<c:if test="${not empty requestScope.searchRes}">
<table width="770" border="1" cellspacing="0" cellpadding="0" align="center" bordercolor="#EDECEC">
<tbody>
<tr>
<td bordercolor="#FFFFFF" bgcolor="#FFFFFF">
<table width="748" border="0" align="center" cellpadding="1" cellspacing="1">
<tbody>
<tr>
<td style="padding-left:6px"> 您查讯的关键字是:
<font color="red">${requestScope.formBean.searchkey} </font>
</td>
</tr>
</tbody>
</table>
<br/>
<table width="750" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#FFCC00">
<tbody>
<tr bgcolor="#FFCC33">
<td>
<div align="center">
<font color="#666666">商品名称</font>
</div>
</td>
<td>
<div align="center">
<font color="#666666">作者</font>
</div>
</td>
<td>
<div align="center">
<font color="#666666">出版社</font>
</div>
</td>
<td>
<div align="center">
<font color="#666666">会员价</font>
</div>
</td>
<td>
<div align="center">
<font color="#666666">VIP 价</font>
</div>
</td>
<td>
<div align="center">
<font color="#666666">购买</font>
</div>
</td>
</tr>
<c:forEach var="res" items="${requestScope.searchRes}">
<tr bgcolor="#FFFFFF">
<td style="padding-left:6px">
<a href="/shop/jsp/bookinf.jsp?bookID=${res.bookId}">${res.bookName} </a>
</td>
<td>
<div align="center">${res.bookPenster} </div>
</td>
<td>
<div align="center">${res.bookCompany} </div>
</td>
<td>
<div align="center">
<font color="#FF6600">${res.bookPrice} 元
</font>
</div>
</td>
<td>
<div align="center">
<font color="#FF9999">更优惠!</font>
</div>
</td>
<td>
<div align="center">
<a href="javascript:;" onclick="javascript:window.open('/shop/bookInfAction.do?bookId=${res.bookId}','gouwu','width=450,height=300,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');">
<img src="/shop/img/goumai.gif" border="0" alt=""/>
</a>
</div>
</td>
</tr>
</c:forEach>
</tbody>
</table>
<form method="Post" action="">
<p align="center" class="contents">
<font class="contents">
<a href="/shop/searchAction.do?page=1&typeid=${requestScope.formBean.typeid}&stepid=${requestScope.formBean.stepid}&action=${requestScope.formBean.action}&searchkey=${requestScope.formBean.searchkey}">首页</a>
<c:if test="${param.page>1}">
<a href="/shop/searchAction.do?page=${param.page-1}&typeid=${requestScope.formBean.typeid}&stepid=${requestScope.formBean.stepid}&action=${requestScope.formBean.action}&searchkey=${requestScope.formBean.searchkey}">上一页</a>
</c:if>
<c:if test="${param.page<=1||empty param.page}">上一页</c:if>
</font>
<font class="contents">
<c:if test="${param.page!=requestScope.searchCount and requestScope.searchCount>=6}">
<c:if test="${empty param.page}">
<a href="/shop/searchAction.do?page=${1+1}&typeid=${requestScope.formBean.typeid}&stepid=${requestScope.formBean.stepid}&action=${requestScope.formBean.action}&searchkey=${requestScope.formBean.searchkey}">下一页</a>
</c:if>
<c:if test="${not empty param.page}">
<a href="/shop/searchAction.do?page=${param.page+1}&typeid=${requestScope.formBean.typeid}&stepid=${requestScope.formBean.stepid}&action=${requestScope.formBean.action}&searchkey=${requestScope.formBean.searchkey}">下一页</a>
</c:if>
</c:if>
<c:if test="${param.page==requestScope.searchCount||requestScope.searchCount==1}">下一页</c:if>
<a href="/shop/searchAction.do?page=${requestScope.searchCount}&typeid=${requestScope.formBean.typeid}&stepid=${requestScope.formBean.stepid}&action=${requestScope.formBean.action}&searchkey=${requestScope.formBean.searchkey}">未页</a>
页次:
<c:if test="${empty param.page}">1</c:if>
<c:if test="${not empty param.page}">${param.page} </c:if>
/
${requestScope.searchCount} 页
</font>
<font class="contents"> 共查讯到
${requestScope.pagedata} 种商品 转到:
<input type="text" name="pagechenge" size="2" maxlength="10" class="smallInput" value="${param.page}"/>
<input type="submit" class="contents" value="GO" name="cndok"/>
</font>
</p>
<font class="contents"> </font>
</form>
<font class="contents"> </font>
</td>
</tr>
</tbody>
</table>
</c:if>
<c:if test="${empty requestScope.searchRes}">
<table bordercolor="#edecec" cellspacing="0" cellpadding="0" width="770" align="center" border="1">
<tr>
<td bordercolor="#ffffff" bgcolor="#ffffff">
<table cellspacing="0" cellpadding="0" width="480" align="center" border="0">
<tr>
<td valign="top">
<br>
<div align="center">
<font color="#ff0000">
<b>商品高级搜索</b>
</font>
<br>
<br>
<table cellspacing="0" cellpadding="1" width="489" align="center" border="0">
<tr>
<td>
<table cellspacing="2" cellpadding="2" width="60%" align="center" bgcolor="#ffffff" border="0">
<html:form action="/searchAction.do" method="post">
<tr>
<td style="PADDING-LEFT: 6px" width="36%">
<div align="center">关 健 字:</div>
</td>
<td style="PADDING-LEFT: 6px" width="64%">
<html:text property="searchkey"/>
</td>
</tr>
<tr>
<td style="PADDING-LEFT: 6px" width="36%">
<div align="center">查找方式:</div>
</td>
<td style="PADDING-LEFT: 6px" width="64%">
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td>
<select name="action">
<option value="1">所有</option>
<option value="2">商品名称</option>
<option value="3">作者名称</option>
<option value="4">出版社名称</option>
<option value="5">图书介绍</option>
</select>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="PADDING-LEFT: 6px" width="36%">
<div align="center">等级分类:</div>
</td>
<td style="PADDING-LEFT: 6px" width="64%">
<select name="stepid">
<sql:query var="BookStep" dataSource="${requestScope.db}" sql="select * from BookStep"/>
<option value="0">全部</option>
<c:forEach var="f" items="${BookStep.rows}">
<option value="${f.BookStepId}">${f.Display} </option>
</c:forEach>
</select>
</td>
</tr>
<tr>
<td style="PADDING-LEFT: 6px" width="36%" height="18">
<div align="center">商品分类:</div>
</td>
<td style="PADDING-LEFT: 6px" width="64%">
<select name="typeid">
<sql:query var="bookType" dataSource="${requestScope.db}" sql="select * from Type"/>
<option value="0">全部</option>
<c:forEach var="f" items="${bookType.rows}">
<option value="${f.TypeId}">${f.Display} </option>
</c:forEach>
</select>
</td>
</tr>
<tr>
<td style="PADDING-LEFT: 6px" colspan="2" height="18">
<div align="center">
<html:image property="submit" border="0" src="/shop/img/search2.gif"/>
</div>
</td>
</tr>
</html:form>
</table>
</td>
</tr>
</table>
<br>
</div>
</td>
</tr>
</table>
<br>
</td>
</tr>
</table>
</c:if>
<table cellspacing="0" cellpadding="0" width="770" align="center" border="0">
<tr>
<td>
<jsp:include flush="false" page="Copyright.jsp"/>
</td>
</tr>
</table>
</body>
</html:html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -