本站不再更新,欢迎光临 java开发技术网
随笔-230  评论-230  文章-8  trackbacks-0

<%@ page language="java" pageEncoding="UTF-8"%>
<%@ 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" %>

<%@ page import="com.unicom.gzaddr.entity.vo.AddressSearchVO"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html locale="true">
  <head>
  <html:base />
  <title>综合搜索</title>
  <meta http-equiv="pragma" content="no-cache">
  <meta http-equiv="cache-control" content="no-cache">
  <meta http-equiv="expires" content="0">
  <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
  <meta http-equiv="description" content="This is my page">
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <style type="text/css">
    #y_tab {
    LINE-HEIGHT: normal; HEIGHT: 28px
    }
    #y_tab UL {
   PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; LIST-STYLE-TYPE: none
    }
    #y_tab LI {
    FONT-SIZE: 14px; BACKGROUND: url(../images/btn.gif) no-repeat left top; FLOAT: left; MARGIN: 0px 0px 0px 1px; WIDTH: 80px; LINE-HEIGHT: 28px; HEIGHT: 28px
    }
 #y_tab LI A {
  DISPLAY: block; FONT-SIZE: 14px; WIDTH: 80px; COLOR: #000; FONT-FAMILY: Arial; HEIGHT: 28px; TEXT-DECORATION: none
    }
 #y_tab .yschfirst {
   FONT-WEIGHT: bold; BACKGROUND: url(../images/btn_cur.gif) no-repeat left top; COLOR: #fff
    }
 #y_tab #cur A {
   FONT-WEIGHT: bold; BACKGROUND-IMAGE: url(../images/btn_cur.gif); COLOR: #fff
    }
 #y_sch_box_input {
   BORDER-RIGHT: #ffb900 1px solid; BORDER-TOP: #ffb900 1px solid; PADDING-LEFT: 3px; FONT-SIZE: 14px; BORDER-LEFT: #ffb900 1px solid; WIDTH: 207px; PADDING-TOP: 2px; BORDER-BOTTOM: #ffb900 1px solid; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #fff
    }
 .y_sch_box_btn {
   PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; WIDTH: 80px; CURSOR: pointer; LINE-HEIGHT: 20px; PADDING-TOP: 0px; HEIGHT: 25px
    }
 .result_bar{
   BORDER-BOTTOM: #dcdcdc 1px solid; HEIGHT: 23px; BACKGROUND-COLOR: #f9f9f8;COLOR: #668bf1;font-size:12px;FONT-WEIGHT: bold;
 }
 .table_border_end{
   BORDER-BOTTOM: #ffffff 1px solid; background-color:#f5f5f5;font-size:12px;color:#555555
 }
  </style>
  <script language="JavaScript" type="text/JavaScript">
    var old_obj=false;
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
     function sb(obj){
       document.all("type").value=obj;
    if(obj=="address"){
        var srcobj=event.srcElement.parentElement.parentElement;
        old_obj=srcobj;
     document.all("address").innerHTML="地址";
     document.all("type").value="address"
    
     srcobj.className="yschfirst";
    
     document.all("name").parentElement.className="";
     document.all("name").innerHTML="<a href='#' onMouseDown=sb('name')>名称</a>";
    
     document.all("mobil").parentElement.className="";
     document.all("mobil").innerHTML="<a href='#' onMouseDown=sb('mobil')>手机号码</a>";
    
     document.all("standard").parentElement.className="";
     document.all("standard").innerHTML="<a href='#' onMouseDown=sb('standard')>地址标准化</a>";

    }else if (obj=="name"){
        var srcobj=event.srcElement.parentElement.parentElement;
        old_obj=srcobj;
     document.all("name").innerHTML="名称";
     document.all("type").value="name";
     srcobj.className="yschfirst";
    
     document.all("address").parentElement.className="";
     document.all("address").innerHTML="<a href='#' onMouseDown=sb('address')>地址</a>";
    
     document.all("mobil").parentElement.className="";
     document.all("mobil").innerHTML="<a href='#' onMouseDown=sb('mobil')>手机号码</a>";
    
     document.all("standard").parentElement.className="";
     document.all("standard").innerHTML="<a href='#' onMouseDown=sb('standard')>地址标准化</a>";
    
    }else if(obj=="mobil"){
        var srcobj=event.srcElement.parentElement.parentElement;
        old_obj=srcobj;
     document.all("mobil").innerHTML="手机号码";
     document.all("type").value="mobil";
     srcobj.className="yschfirst";
    
     document.all("address").parentElement.className="";
     document.all("address").innerHTML="<a href='#' onMouseDown=sb('address')>地址</a>";
    
     document.all("name").parentElement.className="";
     document.all("name").innerHTML="<a href='#' onMouseDown=sb('name')>名称</a>";
    
     document.all("standard").parentElement.className="";
     document.all("standard").innerHTML="<a href='#' onMouseDown=sb('standard')>地址标准化</a>";
    }else if(obj=="standard"){
        var srcobj=event.srcElement.parentElement.parentElement;
        old_obj=srcobj;
     document.all("standard").innerHTML="地址标准化";
     document.all("type").value="standard";
     srcobj.className="yschfirst";
    
     document.all("address").parentElement.className="";
     document.all("address").innerHTML="<a href='#' onMouseDown=sb('address')>地址</a>";
    
     document.all("name").parentElement.className="";
     document.all("name").innerHTML="<a href='#' onMouseDown=sb('name')>名称</a>";
    
     document.all("mobil").parentElement.className="";
     document.all("mobil").innerHTML="<a href='#' onMouseDown=sb('mobil')>手机号码</a>";
    }
  }
  function sb_r(obj){
       if(obj=="address"){
 
        var tab=document.getElementById("y_tab");
        var LIlist=tab.getElementsByTagName("LI");
        //alert("LIlist size->"+LIlist.length);
        var srcobj=LIlist[0];
        //alert("srcobj"+srcobj);
     document.all("address").innerHTML="地址";
     document.all("type").value="address"
    
     srcobj.className="yschfirst";
    
     document.all("name").parentElement.className="";
     document.all("name").innerHTML="<a href='#' onMouseDown=sb('name')>名称</a>";
    
     document.all("mobil").parentElement.className="";
     document.all("mobil").innerHTML="<a href='#' onMouseDown=sb('mobil')>手机号码</a>";
    
     document.all("standard").parentElement.className="";
     document.all("standard").innerHTML="<a href='#' onMouseDown=sb('standard')>地址标准化</a>";
    }else if(obj=="name"){
     var tab=document.getElementById("y_tab");
        var LIlist=tab.getElementsByTagName("LI");
        //alert("LIlist size->"+LIlist.length);
        var srcobj=LIlist[1];
       
     document.all("name").innerHTML="名称";
     document.all("type").value="name";
     srcobj.className="yschfirst";
    
     document.all("address").parentElement.className="";
     document.all("address").innerHTML="<a href='#' onMouseDown=sb('address')>地址</a>";
    
     document.all("mobil").parentElement.className="";
     document.all("mobil").innerHTML="<a href='#' onMouseDown=sb('mobil')>手机号码</a>";
    
     document.all("standard").parentElement.className="";
     document.all("standard").innerHTML="<a href='#' onMouseDown=sb('standard')>地址标准化</a>";
    
    }else if(obj=="mobil"){
        var tab=document.getElementById("y_tab");
        var LIlist=tab.getElementsByTagName("LI");
        //alert("LIlist size->"+LIlist.length);
        var srcobj=LIlist[2];
       
     document.all("mobil").innerHTML="手机号码";
     document.all("type").value="mobil";
     srcobj.className="yschfirst";
    
     document.all("address").parentElement.className="";
     document.all("address").innerHTML="<a href='#' onMouseDown=sb('address')>地址</a>";
    
     document.all("name").parentElement.className="";
     document.all("name").innerHTML="<a href='#' onMouseDown=sb('name')>名称</a>";
    
     document.all("standard").parentElement.className="";
     document.all("standard").innerHTML="<a href='#' onMouseDown=sb('standard')>地址标准化</a>";
    }else if(obj=="standard"){
        var tab=document.getElementById("y_tab");
        var LIlist=tab.getElementsByTagName("LI");
        //alert("LIlist size->"+LIlist.length);
        var srcobj=LIlist[3];
       
     document.all("standard").innerHTML="地址标准化";
     document.all("type").value="standard";
     srcobj.className="yschfirst";
    
     document.all("address").parentElement.className="";
     document.all("address").innerHTML="<a href='#' onMouseDown=sb('address')>地址</a>";
    
     document.all("name").parentElement.className="";
     document.all("name").innerHTML="<a href='#' onMouseDown=sb('name')>名称</a>";
    
     document.all("mobil").parentElement.className="";
     document.all("mobil").innerHTML="<a href='#' onMouseDown=sb('mobil')>手机号码</a>";
    }
  }
 
 
  </script>
 
  </head>
  <body topmargin="0" leftmargin="0">

  <Br><br>
  <table width="500" height="28px"  border="0" align="center" cellpadding="0" cellspacing="0" id="y_tab">
    <tr align="center" id="tr1">
      <td align="center" id="td1">
     <UL>
      <%if(request.getAttribute("type")==null){%>
        <LI class="yschfirst">
   <%}else{%>
       <LI>
      <%}%>
       <span id="address">地址</span>
   </LI>
      <LI>
      <span id="name" ><a  href="#" onMouseDown="sb('name')">名称</a></span>
   </LI>
      <LI>
      <span id="mobil" ><a  href="#" onMouseDown="sb('mobil')">手机号码</a></span>
   </LI>
      <LI>
      <span id="standard" ><a  href="#" onMouseDown="sb('standard')">地址标准化</a></span>
   </LI>
  </UL>
   </td>
 </tr> 
  </table>
  <table width="550" height="70px"  border="0" align="center" cellpadding="0" cellspacing="0">
    <tr height="5px">
      <td width="5px" height="5px"  background="../images/y_box_a.gif"></td>
   <td width="590px" height="5px" background="../images/y_box_top_bg.gif"></td>
   <td width="5px" height="5px" background="../images/y_box_b.gif"></td>
    </tr>
    <tr bgcolor="#ffffc6" height="60px">
     <form action="<%=request.getContextPath()%>/allSearchAction.do?method=searchDo" method="post" name="form1">
   <td width="600" height="60px" colspan="3" style="border-right:1px solid #FFA800;border-left:1px solid #FFA800">
       &nbsp;<input type="hidden" name="type" id="type" value="address">
       <%if(request.getAttribute("searchText")==null){%>
      <input type="text" id="y_sch_box_input" name="searchText" >
    <%}else{%>
      <input type="text" id="y_sch_box_input" name="searchText" value="<%=(String)request.getAttribute("searchText")%>">
    <%}%>
    &nbsp;&nbsp;<input type="submit" class="y_sch_box_btn" value="搜   索">
   </td>
  </form>
    </tr>
    <tr>
      <td width="5px" height="5px"  background="../images/y_box_d.gif"></td>
   <td width="590px" height="5px" background="../images/y_box_bot_bg.gif"></td>
   <td width="5px" height="5px" background="../images/y_box_c.gif"></td>
    </tr>
  </table>
  <table width="550" border="0" align="center" cellpadding="1" cellspacing="0">
    <tr class="result_bar">
      <td><span id="result_title">搜索结果</span></td>
    </tr>
    <logic:equal name="have_return" scope="request" value="false">
    <tr>
      <td  class="table_border_end">搜索不到符合条件的记录!</td>
    </tr>
    </logic:equal>
    <logic:equal name="have_return" scope="request" value="true"> <!--表示搜索得到记录 -->
      <logic:equal name="type" scope="request" value="address">
        <logic:present name="dataList" scope="request">
          <logic:iterate name="dataList" scope="request" id="xdata" type="com.unicom.gzaddr.entity.vo.AddressSearchVO">
            <tr>
              <td  class="table_border_end">
                 <html:link page="/addrview.do?method=view" paramProperty="addr_id" paramName="xdata"  paramId="addr_id"  style="color:blue;font-size:12px; "> <bean:write name="xdata" property="addr_name"/></html:link><br>
                 <bean:write name="xdata" property="addr_path"/>
              </td>
            </tr>
         </logic:iterate>
       </logic:present>
      </logic:equal>
      <!-- 地址标准化 -->
      <logic:equal name="type" scope="request" value="standard">
         <Tr>
           <td  class="table_border_end">
             <bean:write name="result" scope="request" filter="false"/>
           </td>
         </Tr>
      </logic:equal>
    </logic:equal>
  </table>
  <p>&nbsp;</p>
  <p><br>
  </p>
  <%
    if(request.getAttribute("type")!=null){
  %>
       <SCRIPT>
           var a;
           a="<%=(String)request.getAttribute("type")%>";
           sb_r(a);
       </SCRIPT>
  <%}%>
  </body>
</html:html>

posted on 2006-03-06 18:00 有猫相伴的日子 阅读(545) 评论(0)  编辑  收藏 所属分类: javascirpt

只有注册用户登录后才能发表评论。


网站导航:
 
本站不再更新,欢迎光临 java开发技术网