//获取图片信息
var imgBase64 = new Array();
var b = $("input[name='imgBase64']");
for (var i = 0; i < b.length; i++) {
imgBase64[i] = b[i].value;
}
$.ajax({
url: "addSale",
type: "post",
data: {
book_name: book_name,
book_ISBN: book_ISBN,
book_price: book_price,
book_describe: book_describe,
book_departmentID: departmentID,
book_classID: classID,
imgBase64: imgBase64
},
traditional: true, //使用传统方式浅层序列化,可以传递数组
success: function (data) {
alert("成功了");
}
})
traditional: true, //使用传统方式浅层序列化,可以传递数组
通过设置这个,可以传递数组,自己记录一下