JSP 页面分页代码示例-2
来源:互联网 发布:域名转入万网 编辑:程序博客网 时间:2024/05/21 08:41
<%@ page language="java" contentType="application/vnd.wap.xhtml+xml;charset=UTF-8" %>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>MP3</title>
</head>
<body>
<jsp:include page="logo.jsp" flush = "true"/><hr/>
<%String path = (String)request.getAttribute("path").toString();
String error = (String)request.getAttribute("error").toString();
String name = new String(request.getAttribute("name").toString().getBytes("iso-8859-1"),"utf-8");
String songclass = (String)request.getAttribute("songclass").toString();
int pageNo = Integer.parseInt(request.getAttribute("pageNo").toString());
int pageCount = Integer.parseInt(request.getAttribute("pageCount").toString());
if(error!=null&&error.equals("error")){%>
<p>页码错误</p>
<%}else{
out.println(name);
}
%><br/>
<%int i = 1; %>
<logic:iterate id="list" name = "newRecommend" scope = "request">
<%=i++ %>)${list.songname }<br/> ${list.songsize }
<a href = "<%=path %>${list.songpath }">下载</a><br/>
</logic:iterate>
<%if(pageNo>1){%><a href="song.do?method=newRecommend&page=<%=pageNo-1%>&id=<%=songclass %>&name=<%=name %>">上一页</a><br/><%}%>
<%if(pageNo<pageCount-1){%><a href="song.do?method=newRecommend&page=<%=pageNo+1%>&id=<%=songclass %>&name=<%=name %>">下一页</a><%}%><br/>
<form action = "song.do?method=newRecommend&id=<%=songclass %>&name=<%=name %>" method = "post">
<input type = "text" size = "3" name="page"/>/<%=pageCount-1%>
<input type = "submit" value = "跳转" style="background:#fff; solid #333333; color:#ccccccc; width:40;"/>
</form>
<br/><a href = "singer.do?method=Songclass">返回上一级</a>
<br/><a href = "index.jsp">返回首页</a>
<hr/><jsp:include page="time.jsp" flush = "true"/>
</body>
</html>
- JSP 页面分页代码示例-2
- JSP 页面分页代码示例-1
- jsp 页面分页超链接代码实现
- Jsp分页模板代码,实现页面内套用分页逻辑
- 适用于Jsp的通用分页程序(示例代码)
- JSP分页示例
- Jsp分页显示示例
- jsp假分页示例
- jsp页面 jstl分页显示行号代码测试,
- 分页复用代码【Page类、JSP显示页面】
- Jsp页面分页程序
- jsp页面分页
- jsp页面分页
- jsp页面添加分页
- jsp分页页面
- jsp页面实现分页
- jsp页面分页
- jsp页面分页逻辑
- mongodb权威指南笔记
- 今天美国大选谁会赢?奥巴马还是罗姆尼?
- Orchard基本概念快速理解
- JSP 页面分页代码示例-1
- @synthesize window=_window之类的写法的理解
- JSP 页面分页代码示例-2
- Outlook 如何打开或关闭邮件预览功能
- ASP.NET获取IP的6种方法
- android 强制横屏的方法
- 杂记之C语言之ASCII码中的转换
- (表-上)堆表 索引组织表 聚簇表
- Win32串口编程
- 使用javascript调用webservice示例
- mysql load infile