Ajax + JSON Summary (1)

Source: Internet
Author: User

Recently, JSON Ajax is used in many projects... Write some notes .. Or a possible solution.
One by one:
JSON problems:
Multi-layer JSON nesting solution: the result is JSON
VaR _ result = eval ('+ Result + ')');
VaR _ DATA = new array ();
For (VAR item in _ result) _ data. Push (_ result [item]);
VaR _ verify = _ DATA [1];
Convert to an array before performing the subscript operation
PS: This project is fine, with only two layers of nesting .. I don't know if the bug will continue after more layers.

Ajax:
Ajax is usually used with many forms,
Here we reference a jq attribute var Params =$ ('form'). serialize ();
Params will be a set returned by all names in the form.

In addition, the data obtained by Ajax is large, and the request time is long... It may have an impact on the page layout, so we should make preparations.

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.