ajax请求时,如果参数是数组,后台是获取不到,有时候需要给他通过join方法,转换为字符串传递,
看到一个这样的写法,有机会了试一下,记录下来加上
traditional: true,//这里设为true就可以了
$.ajax({ url: 'xxxx.do', data: { ids: ids}, dataType: "json", type: "POST", traditional: true,//这里设为true就可以了 success: function (responseJSON) { alert('Ok'); } });