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)