Home >Web Front-end >JS Tutorial >jquery ajax fails to pass array to background
At first I thought traditional:true was dispensable, but later when I didn’t use traditional, I found that the value of selectUsers could not be obtained in the background, so it is certain that the default value of traditional is false.
When the submitted parameter is an array ({selectUsers:[value,value,value]}),
If it is false, it will be submitted when Is "selectUsers[]=value&selectUsers[]=value"
#name | nihao | |||||||||||||
##list[] | [3] | |||||||||||||
##0 x | ||||||||||||||
y | ||||||||||||||
z | ||||||||||||||
o | ||||||||||||||
zzzzz | ##m2[list][] | |||||||||||||
[3 | ]##0 | |||||||||||||
x1 | ##1 | |||||||||||||
##2 | ||||||||||||||
m2[ckee] | ||||||||||||||
If set to true, the submission will be "selectUsers=value&selectUsers=value"
|
The above is the detailed content of jquery ajax fails to pass array to background. For more information, please follow other related articles on the PHP Chinese website!