When a parameter is submitted to the background with $.ajax (), the array in the parameter is generally received in the background by an array object such as list, or integer[].
Like what:
$.ajax ({
Type: "POST",
Url:url,
data:{gender:[0,1]},
DataType: "JSON",
Async:false
});
Here's an array of gender to query for sex.
When you use Firefox's firebug to view post data, if the jquery version is too high, you'll find gender submitting the following types
Schgender[] 1
schgender[] 0
That is, it treats each element in the array as an array. This way to the background will be an error.
The solution is to switch to a lower version of jquery, and I'll have no problem replacing it with 1.3.2 (not recommended). And then look at the post data:
Schgender 1
Schgender 0
The best solution is to add a property
traditional:true
$.ajax ({
Type: "POST",
Url:url,
Traditional:true,
data:{gender:[0,1]},
DataType: "JSON",
Async:false
});