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

📄 planesearch.jsp

📁 这是jsp通用模块导航的程序原代码,里面有新闻,bbs等jsp与javabean结合的程序.
💻 JSP
字号:
<%@ page language="java" contentType="text/html; charset=GB2312"
	pageEncoding="GB2312"%>
<%@ page import="com.wxpn.tutorial.ec.util.ProvinceHandler" %>
<%@ page import="java.util.Collection,java.util.Iterator"%>
<%@ page import="com.wxpn.tutorial.ec.util.TravValueMapBean"%>
<%@ page import="java.util.HashMap"%>
<%@ include file="../include/header.jsp"%>

<TABLE border=0 cellPadding=0 cellSpacing=0 width=760 align="center">
	<TBODY>
		<tr>
			<td align="left" height=25>当前位置:<a href="../index.jsp">首页</a> -&gt;
			查询商品</td>
			<%@ include file="../include/date.jsp"%>
		</tr>
		<TR bgColor=#3399ff>
			<TD height=1 colspan="2"><IMG height=1 src="images/spacer.gif"
				width=16></TD>
		</TR>
		<tr>
			<td height=10 colspan="2"><IMG height=1 src="images/spacer.gif"
				width=16></td>
		</tr>
	</TBODY>
</TABLE>

<table align="center" border="0" width="760" cellspacing="0"
	cellpadding="0" height="381">
	<tr>
		<td width="150" height="355" valign="top"><%@ include
			file="../include/top_banner.jsp"%></td>
		<td width="10" height="100%"></td>
		<td width="1" height="100%" bgcolor="#3399ff"></td>
		<td width="10" height="100%"></td>
	  <td width="589" height="172" align="center" valign="top" background="images/bg1.gif">

		<table border="0" width="750%" cellspacing="0" cellpadding="0">
			<tr>
				<td colspan="3" width="" height="20" bgcolor="#00DF00">&nbsp;<font
					color="#ffffff">站内搜索 -> 关键字:</font><b> <font color="Red"> 
			  <%String keyWord;
			keyWord = request.getParameter("keyword");
			if (keyWord != null) {
				out.println(keyWord);
			}

		%> </font></b></td>
			</tr>
			<tr>
				<td colspan="121" width="" height="" bgcolor="">
				<form name="search_form" action="/ECommerce/SearchPlaneServlet" method="post">
				  <p>查询旅游路线: <br>
				始发城市:
				  <input type="text" name="keyword1" size="16" value="请输入关键字"
					onmouseover="this.focus()" onfocus="this.select()">
				   <br>
				到达城市:
				 <input type="text" name="keyword2" size="16" value="请输入关键字"
					onmouseover="this.focus()" onfocus="this.select()" />
				  </p>
				  <p>
			        <input type="button" value="查询!" onclick="search_sub()">
		          </p>
				  <p><br>
		            <script language="javascript">
                        function search_sub()
                        {
                                if(document.search_form.keyword1.value==""&& document.search_form.keyword2.value=="")
                                {
                                        window.alert("请输入关键字!");
                                        return;
                                }
								 document.search_form.submit();
                              
                        }
                        </script>
			      </p>
				</form>				</td>
			</tr>
		</table>		
		<table width="586" border="0">
          <tr>
            <td bgcolor="#00FFFF">出发-目的</td>
            <td bgcolor="#7FFFFF">价格</td>
            <td bgcolor="#7FFFFF">航班号</td>
            <td bgcolor="#7FFFFF">起飞时间</td>
            <td bgcolor="#7FFFFF">降落时间</td>
          </tr>
		  
									<%if (request.getAttribute("c") == null) {

			                    %>
								<tr>
									<td 75%"" colspan=5 bgcolor="#FCFCFC" align=center>没有任何信息。</td>
								</tr>
								<%} else {
				Collection c = (Collection) request.getAttribute("c");
				if (c == null) {

				%>
								<tr>
									<td colspan=5 bgcolor="#FCFCFC" align=center>还没有任何信息。</td>
								</tr>
								<%} else {
					int totalPageNum = ((Integer) (request
							.getAttribute("totalPageNum"))).intValue();
					int currentPage = 1;
					if (request.getParameter("page") != null) {
						currentPage = Integer.parseInt(request
								.getParameter("page"));
					}
					TravValueMapBean mapbean = new TravValueMapBean();
					HashMap map = new HashMap();
					Iterator iterator = c.iterator();
					String cityStr = "";%>
					<%
					while (iterator.hasNext()) {
						mapbean = (TravValueMapBean)iterator.next();
						cityStr=mapbean.getValStr("departplace")+"-"+mapbean.getValStr("arriveplace");
						
                      %>
		              <%}%>
			 <tr>
	            <td bgcolor="#FFFFAA"><%=cityStr%></td>
	            <td bgcolor="#FFFFAA"><%=mapbean.getValStr("price") %></td>
	            <td bgcolor="#FFFFAA"><%=mapbean.getValStr("flyitemid") %></td>
	            <td bgcolor="#FFFFAA"><%=mapbean.getValStr("departtime") %></td>
	            <td bgcolor="#FFFFAA"><%=mapbean.getValStr("arrivetime") %></td>
          </tr>
					<%}}
				%>
        </table>
		<table width="200" border="0">
          <tr>
            <td align="center"><font color="#AA0000" size="5"><a href="../order/planeorder.jsp">机票预订</a></font></td>
          </tr>
        </table></td>
	</tr>
</table>
<%@ include file="../include/footer.jsp"%>

⌨️ 快捷键说明

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