Special Characteristics of volist tags in thinkphp in ajax operations (recommended), thinkphpvolist

Source: Internet
Author: User

Special Characteristics of volist tags in thinkphp in ajax operations (recommended), thinkphpvolist

Background

Implement the volist label in a complex page (including volist) of ThinkPHP to display the return of Jquery query results

Knowledge Point

The purpose of ajax is to refresh some table data without refreshing the entire page. However, note that the volist tag in the ThinkPHP framework is running on the server, therefore, the thinkPHP tag cannot be used for dynamically obtained data using js.$ This-> ajaxReturn ($ data );Directly use$ ("# Div_id"). HTML (data).

Existing solutions (all have defects)

1. Create a new page for display

Open a new jump page and return the value $ this-> assign ("volist_name", $ data.

** Defect: it is equivalent to re-loading the entire page and does not meet the requirements of some update forms.

2. display without the tag of the thinkPHP framework

If the volist label is not used, the results returned by ajaxReturn are analyzed and displayed according to the template of your own js. Partial form updates can be implemented.

1. template<Script id = "events-template" type = "x-tmpl-mustache" >{{# data }}

Summary

The above section describes the special characteristics of the volist tag in thinkphp in ajax operations (recommended). I hope it will help you. If you have any questions, please leave a message, the editor will reply to you in a timely manner. Thank you very much for your support for the help House website!

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.