jquery的ajax可以传入的三种参数类型

时间:2024-10-22 12:05:26

在jquery的ajax函数中,可以传入3种类型的数据

1.文本:"uname=alice&mobileIpt=110&birthday=1983-05-12"

2.json对象:{uanme:'vic',mobileIpt:'110',birthday:'2013-11-11'}

3.json数组:

[
{"name":"uname","value":"alice"},
{"name":"mobileIpt","value":"110"},
{"name":"birthday","value":"2012-11-11"}]