$("#gaipai").click(function(){
var arrs=new Array();
$("input[name='id']:checkbox").each(function(){
if($(this).attr("checked")){
arrs.push($(this).val());
}
});
if(arrs.length==0 ){
alert('请选择数据!');
return ;
}
location.href=ROOT+"/mims/customer.do?method=goGaiPai&ids="+arrs.join(",");
var arrs=new Array();
$("input[name='id']:checkbox").each(function(){
if($(this).attr("checked")){
arrs.push($(this).val());
}
});
if(arrs.length==0 ){
alert('请选择数据!');
return ;
}
location.href=ROOT+"/mims/customer.do?method=goGaiPai&ids="+arrs.join(",");
});
首先便利所有name是id的input 判断该input是否被选中。放入list中,用,号隔开