JSP页面前端
var ids = $('input[type=checkbox][alt=one]:checked');
var data=new Array();
$(ids).each(function(index,value){
data.push($(this).val());
});
$.post('${path}/customer/del.html', {idCustomers:data.toString()}, function(json) {
if(json.success){
alert(json.msg);
} else {
alert(json.msg);
}
});
JAVA后台接受
使用SPRING MVC框架,参数名为:idCustomers
@RequestMapping(value="/del.html")
public @ResponseBody JSONResponse removeCustomerDetail(Long[] idCustomers){
JSONResponse json = new JSONResponse();
return json;
}