我要把for循环下每个data全部传给ajax,可是我现在每次只能取到最后一个data而已!
for(var i=0;i<selRow.length;i++){
var registCode=selRow[i].registCode;
var formId=selRow[i].formId;
var data = {'registCode':registCode,'formId':formId};
}
$.ajax({
type : 'post',
url : '${ctx}/intr/print/getDetailFee',
dataType : 'json',
data : data,
success : function(data) {
var fileName = data.entity.fileName;
if (data.success == true) {
location.href = "${ctx}/intr/print/downLoadCollectionLineWPdf?fileName="
+ fileName
} else {
$.modalAlert(data.message, "error");
}
$.loading(false);
}
})
}