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

📄 clientlist.jsp

📁 电子商务网站使用MVC模式B/S结构功能不是很全适合初学者看
💻 JSP
📖 第 1 页 / 共 2 页
字号:
<%@ page contentType="text/html; charset=gb2312"%>
<%@page import="java.util.Hashtable"%>
<%@page import="java.util.ArrayList" %>

<script src="<%=request.getContextPath()%>/js/showDiv.js"></script> 
<script src="<%=request.getContextPath()%>/js/search.js"></script> 
<script >
function toResultPage(str){
	form1.action="<%=request.getContextPath()%>/clientListAction?pageNumber="+str;
	form1.submit();
}	
</script>
<% 	
		String searchResultSize=session.getAttribute("searchResultSize".toUpperCase()).toString();

		if(request.getParameter("logged")!=null){
%>
			<script language="javascript">
				alert("请登陆!");
			</script>
<%	
		}else if(request.getParameter("done")!=null){		
%>		
			<script language="javascript">
				alert("操作成功!");
			</script>
<%
		}	
%>		

<style type="text/css">
<!--
A {
    COLOR: #3333CC; TEXT-DECORATION: none ;border-bottom:1px dotted
}
.mobile_top5_1{
	margin:5px 4;
	padding:0;
	width:190px;
	height:127px;
   background:url(<%=request.getContextPath()%>/image/moblie_bg1.gif);
}
.mobile_top5_1 h4{
 margin:22px 5px 2 1px;
 font-size:12px; 
 width:20px; 
 height:100px; 
 float:left; 
 text-align: center; 
 font-weight:normal;
}
.mobile_top5_1 table{
margin:5px 5px 2px 0; 
float:right;
}
.aindex{color: blue;font-size: 13px}
.currentindex{color: red;font-size: 13px}
.index{color: black;font-size: 12px}
.style1 {color: #ECE9D8;font-size: 12px}
.style3 {font-size: 12px}
.style4 {color: #3333CC}
-->
</style>
<body >
<center>
<div align="center"></div>
<table    width="757" height="333" border="1" align="center" cellpadding="0" cellspacing="1">
  <tr >
    <td width="202" valign="top"  background="<%=request.getContextPath()%>/image/6.gif" >
		<table    width="198" height="179" cellspacing="1">
	  		<tr><td   bgColor=#c8cccf colspan="2">
				<div align="center"><span class="style1"  >搜索选项</span>
			  </div></td>
			</tr>	
	  	<form name="search" method="post" action="<%=request.getContextPath()%>/searchAction">
			<input type="hidden" name="searchType" value="otherSearch">  
	  	
    		<tr><td width="60" height="20" class="style1">手机品牌 </td>
    		<td width="129">
              <select name="card"   >
  <% 	
					ArrayList list=new ArrayList();
				  	if(application.getAttribute("card".toUpperCase())!=null){
				  		list=(ArrayList)application.getAttribute("card".toUpperCase());
				  	}
				  	System.out.println("在也面中的"+list.size());	
				  	if(list!=null){
				  		for(int i=0;i<list.size();i++){
				  			Hashtable table=(Hashtable)list.get(i);
				  			String card=table.get("card".toUpperCase()).toString();
%>
               		    <option value="<%=card%>"><%=card%></option>
  
                <%				  			
				  		}		
				  	}	
%>                    
                          <option value="-----任意-----" selected>-----任意-----</option>
              </select>       		  </td>
   			</tr>
          
    		
    		<tr><td height="29" class="style1">手机类型</td>
    		<td>
    			<select name="model"  size="1" id="model">
            <option value="直板">直板</option>
            <option value="滑盖">滑盖</option>
            <option value="翻盖">翻盖</option>
            <option value="旋转">旋转</option>
            <option value="-----任意-----" selected>-----任意-----</option>
              </select>
   			  </td>
    		</tr>
    		<tr><td height="24" class="style1">拍照功能</td>
    		<td>
    			<select name="photo" size="1" id="photo">
                  <option value="没有">没有</option>
                  <option value="&lt;100万">&lt;100万</option>
                  <option value="100~200">100~200</option>
		    <option value="200~300">200~300</option>
                  <option value="&gt;300">&gt;300</option>
                  <option value="-----任意-----" selected>-----任意-----</option>
              </select>
			  </td>
    		</tr>
    		<tr><td height="27" class="style1">网络制式</td>
    		<td>
    			<select name="net" size="1" id="net" >
                  <option value="cdma">cdma</option>
                  <option value="gsm单频">gsm单频</option>
                  <option value="gsm双频">gsm双频</option>
                  <option value="gsm三频">gsm三频</option>
                  <option value="-----任意-----" selected>-----任意-----</option>
              </select>
   			  </td>
    		</tr>
    		<tr><td class="style1">功能特点</td>
    		<td>
    			<select name="special" size="1">
                  <option value="流媒体">流媒体.</option>
                  <option value="蓝牙">蓝牙</option>
                  <option value="彩屏">彩屏</option>
                  <option value="可换壳">可换壳</option>
                  <option value="wap">wap</option>
                  <option value="gprs">gprs</option>
                  <option value="红外">红外</option>
                  <option value="java">java</option>
                  <option value="mms卡">mms卡</option>
                  <option value="mp3">mp3</option>
                  <option value="收音">收音</option>
                  <option value="usb">usb</option>
                  <option value="-----任意-----" selected>-----任意-----</option>
              </select>
			  </td>
    		</tr>
        	<tr>
        	  <td class="style1">价格范围</td>
        	  <td height="29" colspan="2" nowrap ><input name="price1" type="text" id="price1" size="6" onKeyUp="if(/\D/.test(this.value)){alert('只能输入数字');this.value='';}">      <span class="style1">至</span><input name="price2" type="text" id="price2" size="6" onKeyUp="if(/\D/.test(this.value)){alert('只能输入数字');this.value='';}">      </td>
      	  </tr>
        	<tr>
        		<td class="style1">关键字:</td>
        		<td height="29" colspan="2" > 
				  <input name="key" type="text" title="可搜索到包含此关键字的任何商品" id="key" size="16" height=22> 
			    </td>
        	</tr>
        	<tr>
				<td colspan="2" bgColor=#c8cccf >
				  <div align="center">
			        <input type="submit" name="submit" value="&nbsp;&nbsp;搜&nbsp;索&nbsp;&nbsp;" width="20" size="20" > 
			        </a>
				    </div></td>
			</tr>	        
    </form>
	  </table><br>
	  <DIV id=tickerbg style="POSITION: absolute"></DIV><DIV id=ticker style="POSITION: absolute"></DIV>
      <DIV class=mobile_top5_1>
        <H4>人气排行榜</H4>
        <TABLE cellSpacing=0 cellPadding=0 width=150 height="" border=0>
          <TBODY>
            <TR>
              <TH width=95 height=20 align=middle class="style3" scope=col>机型</TH>
              <TH width=30 height=20 align=middle class="style3 style4" scope=col>人气</TH>
            </TR>
			
			<%	
				Hashtable table=new Hashtable();
				String card="",num="",model="",photo="",net="",price="",special="",picture="",describe="",restNum="";
				int id=0;

						list=(ArrayList)(application.getAttribute("concernPhone".toUpperCase()));
						if(list!=null){	
							for(int i=0;i<list.size();i++){
								table=(Hashtable)list.get(i);
								int concern=1;
								String mes="品牌:"+table.get("card".toUpperCase()).toString();
								 mes=mes+"<br>型号:"+table.get("num".toUpperCase()).toString();
								 mes=mes+"<br>机型:"+table.get("model".toUpperCase()).toString();
								 mes=mes+"<br>相机:"+table.get("photo".toUpperCase()).toString();
								 mes=mes+"<br>特点:"+table.get("special".toUpperCase()).toString();
								concern=Integer.parseInt(table.get("concern".toUpperCase()).toString());
								if(concern/100>15)concern=30;
								else if(concern/100>14)concern=28;
								else if(concern/100>13)concern=26;
								else if(concern/100>12)concern=24;
								else if(concern/100>11)concern=22;
								else if(concern/100>10)concern=20;
								else if(concern/100>9)concern=18;
								else if(concern/100>8)concern=16;
								else if(concern/100>7)concern=14;
								else if(concern/100>6)concern=12;
								else if(concern/100>5)concern=10;
								else if(concern/100>4)concern=8;
								else if(concern/100>3)concern=6;
								else if(concern/100>2)concern=4;
								else concern=1;
								String str=table.get("showString".toUpperCase()).toString();
								id=	Integer.parseInt(table.get("id".toUpperCase()).toString());
								if(i%2==0)out.print("<TR align=middle bgColor=#f3f3f3>");
								else out.print("<TR align=middle>");
								out.print("<TD align=center height=18><a href=\""+request.getContextPath()+"/clientShowOneCommodityAction?id="+id+"\" onmouseover=\"showmessage('"+mes+"')\" onmouseout=hideticker() target=\"_blank\">"+str+"</a></td>");
								out.print("<TD align=left height=18><IMG height=10 src=\""+request.getContextPath()+"/image/hotlevel.gif\" width="+concern+"></TD>");
								out.print("</TR>");
							}
						}

⌨️ 快捷键说明

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