How to realize non-refresh paging in thinkphp ajax
Today, I will talk to you about how to achieve thinkphp ajax non-refresh pagination, many people may not know much about it. In order to make you understand better, the editor has summarized the following content for you. I hope you can get something according to this article.
Step by step to realize the ajax without refreshing the preface of paging on thinkphp
The paging class included in the thinkphp framework refreshes the whole page every time the page is turned, which is obviously not an ideal user experience. We hope that each page turn will only refresh part of the data we want in the dataset, so it is easy for us to think of ajax asynchronous communication, using ajax to communicate asynchronously with the database (I used the mysql database in the development process) to return the data queried from the database. Replace the original data with jquery to perform a local refresh without refreshing the page, thus achieving our desired results.
Thinkphp ajax paging class
This paging class is a resource found on the Internet. You can create such a class directly in your own thinkphp. The name of the class here is AjaxPage.class.php.