开发者

How to add more.. button to search results

I'm creating a website that shows 20 search results from the searched query, by taking the results from the database. If, in the address bar, the user has $n=(number) the number of results would be that number. So I thought of creating a button that resends the request but with $n=$n+10 , but that would refresh the page and I want a way to keep the user on the page and show 10 more results quickly and easily. 开发者_高级运维Any ideas?


There are only two ways. Regular way that refreshes the page and ajax. If you are new to Ajax, I suggest you to use jQuery functions. It makes everything much easier to load that extra data and display them without refreshing the page.

http://api.jquery.com/category/ajax/

I suggest you to start with jQuery.post() function since you are new to this.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜