使用jQuery的JSP分页 [英] JSP Pagination using jQuery

查看:75
本文介绍了使用jQuery的JSP分页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将结果设置为request参数中的List,并在JSP中创建了一个结果页面,该页面将所有结果显示在同一页面中.

I am setting the results as a List in the request parameter and I created a results page in JSP which displays all the results in same page.

我的要求是对从servlet检索的结果进行分页.我不知道该怎么做.

My requirement is to paginate the results retrieved from servlet. I am puzzled in what way I can do it.

分页界面应如下所示:

< Prev 1-25 Next>.

有人可以指导我如何做到这一点吗?是否有任何api可以做到这一点,或者我必须改变从servlet到JSP检索结果的方法.

Can someone please guide me how could I accomplish this? Is there any api to do it, or do I have to change the way of approach in retrieving the results from servlet to JSP.

推荐答案

希望您以表的形式显示所有数据?如果是,则使用datatables,这是使用Jquery的最佳插件

Hope you are displaying all the data in the form of tables?If so then use datatables,this is the best plugin there is using Jquery

这里有演示 http://jsfiddle.net/upenrao/HEDvf/7/light /

这是官方网站 http://www.datatables.net/

这篇关于使用jQuery的JSP分页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆