How do I pass JSON data in the destruction function of Ajax? How do I accept and convert an array in the controller?

Source: Internet
Author: User
  1. First of all, we have tested (or your usual development experience) know that in the Ajax callback function using Get or POST method can pass the string (do not believe you can write the instance test, but note: Get method has data volume limit):

  2. Method One: We convert the AJAX request back into a JSON array into a string, and then get past the callback function:

Ajax request code for the a.html page:

B. Background two processing functions (note in particular that the second is the handler that the callback function points to):

Method Two: We directly process the callback function to send a new AJAX request (also can be written as an anonymous function), the AJAX returned JSON array into a string as a new parameter post past (also can get):

A.ajax Request page:

B. Background two processor pages (especially note that the next one is to receive the parameters passed by the callback function and into the array):


How do I pass JSON data in the destruction function of Ajax? How do I accept and convert an array in the controller?

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.