An example of this article describes the method of implementing no refresh paging based on Ajax. Share to everyone for your reference. Specifically as follows:
In normal paging, once the page number changes, the URL changes, the entire page will refresh, if we want the page number changes do not affect the entire page changes, you can use AJAX technology.
AJAX is a technique for creating fast-moving web pages. AJAX enables asynchronous updating of Web pages by making a small amount of data exchange in the background with the server. This means you can update portions of a Web page without reloading the entire page.
Through the client-side HTML code, the data in the server is passed by using AJAX and displayed in HTML.
In the paging class, we simply change the address of the hyperlink, change the original address to call the F1 () method through JS, and pass the link to the F1 () method in JS.
<a href= ' javascript:f1 (\ "{$this->uri}&page=". $this->page+1). " \ ") ' >
Further, you can use JSON to achieve a no refresh effect of paging, compared with Ajax, JSON will HTML and CSS are written on the client, thereby saving the server bandwidth, but also to speed up the user's request, the specific method no longer repeat.
I hope this article will help you with your AJAX programming.