Jquery Ajax 传递数组参数

 
  
var data = new Array();
data[0] = "1";                                 $.ajax({                                         type: "post",                                         url:"${front_url}/portal/upLoadImage1.json",                                         data: {url : data},                                         async: true,                                         traditional: true, // 传数组需要加上这个属性。                                         success: function (data) {                                             console.log(data);                                             if(data["code"] == 0) {                                                 if(data["count"] == 5) {                                                                                                      }                                             }                                         }, error: function (e) {                                             alert(e.responseText); //alert错误信息                                           }                                     });

你可能感兴趣的:(Jquery)