The method of realizing without refreshing paging based on Ajax _ajax correlation

Source: Internet
Author: User

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.

<!doctype 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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.