且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

$ .ajax将[]附加到密钥

更新时间:2023-08-26 21:14:34

jQuery 1.4中添加了方括号(即[])来处理多维数组.如果要删除此选项,则应将传统选项设置为true,如下所示:

The square bracket (i.e. []) added in jquery 1.4 to handle the multiple dimension array. If you want to remove this you should set the traditional option to true, as shown below:

$.ajaxSettings({traditional: true});

以下链接详细说明. 在jQuery Form Data中带有括号的问题以json格式发送数据

Following link explain the details. issue with brackets in jQuery Form Data when sending data as json