显示更多按钮分页,AJAX / jQuery / JAVA [英] Show More button pagination, AJAX/jQuery/JAVA

查看:95
本文介绍了显示更多按钮分页,AJAX / jQuery / JAVA的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个函数,比如A()根据提供的范围调用数据库中的一些元素。

我想做的是,在用户界面上,有一个''加载更多''按钮,当点击时,显示下一组项目,通过使用jQuery调用AJAX调用上面的函数A()。

我经历了一些论坛,但是无法清楚地了解如何做到这一点。


谢谢

I have a function, say A() that calls some elements from the database depending on the range provide.
What I want to do is, on the UI, there is a ''Load More'' button, which when clicked, displays next set of items, by calling the above function A() by making an AJAX call using jQuery.
I went through some forums, but was not able to get a clear understanding of how to do it.

Thank you

推荐答案

这一切都取决于你如何选择元素超出数据库。 if(例如)你使用LIMIT子句并传递集合数和起始数,你只需要在AJAX调用中增加起始数参数。
it all depends on how you select the elements out of the DB. if (e.g.) you use a LIMIT clause and pass the amount of sets and a starting number, you simply need to increase the starting number parameter in the AJAX call.


Ya,但是我是什么我想知道的是,就像我在AJAX调用中提到调用相应控制器函数的URL一样。现在该函数发送一个Object作为结果,我只希望该对象的某些字段与页面加载期间创建的原始html表合并。我该怎么做?
Ya, but what I want to know is, like I mention the URL in the AJAX call which calls the corresponding controller function. Now that function sends an Object as a result, and I want only certain fields of that object to be merged with the original html table that was created during the page loading. How do I do that?


没有代码就不可能说。


这篇关于显示更多按钮分页,AJAX / jQuery / JAVA的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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