A simple ajax

Source: Internet
Author: User
Provides various official and user-released code examples. For code reference, you are welcome to exchange and learn simple ajax paging. You do not need to modify php code or other built-in paging classes, you only need a simple js Code.
Let's just talk about the train of thought. People can understand it at a glance.

The premise is to use the tp rendering template function in the Controller: fetch ();

First, is there a link to the page with the built-in pages of tp? Directly use js to obtain the herf of the a tag under the page, and then use return false; do not let him jump.

Second, (native js, I want to solve it myself) Is there a url parameter in jquery's ajax ?, Then, put the obtained a tag url in this parameter.

Background code $ This-> assign ('investid', $ queried data );
Echo $ content = $ this-> fetch ('ajax _ XXX'); // rendered html Template
Page code


{$ _ Page}


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.