这是我的ajax代码
$('.AllTaskDownloadButton').live('click', '.CheckBoxesForDownload', function(){
var n = $( "input:checked.CheckBoxesForDownload" ).length;
var arr=[]
for(i=0;i<n;++i){
arr.push($($( "input:checked.CheckBoxesForDownload" )[i]).val())
}
alert(arr)
//passing requestId to servlet
$.ajax({
url:"/test/DownloadDeleteTask",
type:"POST",
dataType:'json',
data: {requestIds:arr,
operationType:'download' },
success:function(result){
alert(result);
dowloadTasks();
}
});//ajax
});
这是我的 servlet 代码:
PrintWriter out = response.getWriter();
String operationType = request.getParameter("operationType");
if (operationType.equalsIgnoreCase("download")) {
out.print("download");
}// if
但我downloadTasks()
没有被调用。
请帮助解决问题?