热门文章 | 热门软件| 热门源码 | 热门电影 | 知识库 | 联系我们
软件 源码 教程 影视 健康 招聘
  HTML | JavaScript | ASP | PHP | JSP | NET | VB | VC | VF | Windows | Linux | Mysql | Mssql | Oracle | Struts 
当前位置: 创世纪计算机资源网 -> 文章频道 ->jsp 
站内搜索:
在JSP页面中实现检索数据的分页显示(4)
作者:佚名 来源:不详 整理日期:2006-12-13

<!--添加头-->

<div align="中心">

<body topmargin="0"leftmargin="10"rightmargin="10” bgcolor="#FFFFFF">
<div align="中心">

<中心>< IFRAME宽度=760高度=130 NORESIZE SCROLLING=否 FRAMEBORDER=0
MARGINHEIGHT=0MARGINWIDTH=0SRC=& quot ; ..\medicinetitle.html"></iframe>

</div>

<!--完成 -->

<title>商品列表</title>

<%

方法 md =新建方法();

矢量 sklist;

同步(会议){

sklist =(矢量) session.getAttribute("medicinelist");

}

%>

<!----------------------------- 显示表头 -------------------------------->

<%

如果( sklist ==空的或 sklist.size() <=0)

{

response.sendRedirect("/medicine/no_medicine.html");

归还;

}

另外

{%>

<center>您好!以下是商品的列表,共有<font color=#ff0000>
<%=request.getParameter("all_count")%></font>条符合条件的药品信息

</center>

<div align="中心">

<中心>

<桌子边界=& quot ;1& quot ;cellpadding=& quot ;0& quot ;cellspacing=& quot ;0& quot ;宽度=& quot ;840& quot ;
bordercolorlight="#FFFFFF"bordercolordark="#000000">

<tr bgcolor="#339933">

<td width=42 align="center"><font color="#339933"><b>明细</b></font></td>

<td width=160 align="center"><font color="#FFFFFF"><b>商品名称</b></font></td>

<td width=52 align="center"><font color="#FFFFFF"><b>超类</b></font></td>

<td width=145 align="center"><font color="#FFFFFF"><b>大类</b></font></td>

<td width=145 align="center"><font color="#FFFFFF"><b>子类</b></font></td>

<td width=270 align="center"><font color="#FFFFFF"><b>描述</b></font></td>

</tr>

<!------------------------------------------------------------------------------------------------------------------->

<%

medicinelist d=新建 medicinelist ();

适合于 ( int索引=0;索引 < sklist.size();index++)

{

d = (medicinelist)sklist.elementAt(index);

绳 lshref;

如果 (d.getYpzy()==null或 d.getYpzy().equals("http://")或 d.getYpzy().equals(""))

{

lshref="";

}另外{

lshref=& quot ;<一 href="+d.getYpzy()+">";

}

out.println("<form命名=表格1 method=post action=/servlet/Medicine.Detail?ypbm="+d.getYpbm()+">");

out.println("<tr bgcolor=#F3F3E9>< td align=center ><字体 color=#000000大小=2>
<input type=submit name=submit1 value=明细></font></td><td align=center><font color=#000000 size=2>");

out.println(lshref+d.getYpm()+"</a></font></td><td align=center ><字体 color=#000000大小=2>& quot ;);

out.println(d.getClmc()+"</font></td><td align=center ><字体 color=#000000大小=2>& quot ;
+d.getDlmc()+"</font></td><td align=center ><字体 color=#000000大小=2>& quot ;);

out.println(d.getZlmc()+"</font></td><td align=center ><字体 color=#000000大小=2>& quot ;
+md.notNull(d.getZyyx())+"</font></td></tr></form>");

out.flush();

}

%>

<表格命名=表格2id=表格2>

<输入类型=hidden命名=maxpos id=maxpos value=<%=d.getYpbm()%>>

< /表格 >

<%

}

%>

</table>

<p></p>

<%

串 ssll=request.getParameter("all_count");

长的长的 temp=新建 ( ssll );

长cou= temp.longValue();

if(sklist.size()==25&&cou>25)

{%>

<input type=button value="下页"onclick="next(1);">

<%}%>

<%

同步(会议){

if(session.getAttribute("medicinelist")!=null){

session.removeValue("medicinelist");

}

}

%>

</center>

<p align="center"><input type="button"value="返回"name="B3"onclick="history.back()">

<br><br><br>

<!--添加底部 -->

<div align="中心">

<中心>< IFRAME宽度=760高度=140 NORESIZE SCROLLING=否 FRAMEBORDER=0
MARGINHEIGHT=0MARGINWIDTH=0SRC=& quot ; ..\bottom.html"></iframe>

</div>

<!--完成 -->

[1]  [2]  [3]  [4]  
相关文章