JQuery obtains the values of multiple input boxes and stores them in an array. jqueryinput

Source: Internet
Author: User

JQuery obtains the values of multiple input boxes and stores them in an array. jqueryinput

<! DOCTYPE html> 

2.

3. stringify () function

Stringify () is used to parse a string from an object, such

Var a = {a: 1, B: 2}

Result:

JSON. stringify ()

"{" A ": 1," B ": 2 }"

4.

 

5. parse the JSON string into the JSON data format in JS. There are two methods:

1. Use the eval () function.

2. The second method of parsing is to use the Function object. Its typical application is to parse the data returned by success under the AJAX method in JQUERY.

DateType: json; return exit (json_encode (array ('code' => 0, 'msg '=> 'transaction serial number error') in the php controller '))); it is best to use the dateType: json that comes with ajax;

 

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.