JSON data Acquisition (network excerpt)

Source: Internet
Author: User
Tags ming

A Simple object:

$.ajax ({                    "post",                    "Handler.ashx",                    "html"                    , "437", uname: "% u6211%u884c%u5ba2%u670d " },                    function  (msg) {                        alert (msg);                    },                     function () {alert (123)}                })

You can use the context. request.form["UID"), context. request.form["uname"] to get the two fields of an object.

Array: If you are passing an array, you should pass a Count field to confirm the number of rows

1 $.ajax ({2Type: "POST",3URL: "Handler.ashx",4DataType: "HTML",5Data: {Count:2, 6people:[{uid: "437", uname: "Small 1" },7{uid: "123", Uname: "Small 2"} ]8                           },9Successfunction(msg) {Ten alert (msg); One                     }, AErrorfunction() {alert (123) } -})

Available context. request.form["People[0][uid]"],context. request.form["People[0][uname]"] get

1 var param = {insurancename: "Little Ming"}; 2 param. Name= "Xiao Ming";

Available context. request.form["Customerparam[name]") or context. request.params["Customerparam[name]"] to obtain;

JSON data Acquisition (network excerpt)

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.