function test(){
if(confirm('你确定要删除吗')){
var obj = document.getElementsByName("check");
var str="";
var check_val = [];
for(var i=0;i<obj.length;i++){
if(obj[i].checked)
check_val.push(obj[i].value);
//拼接所有的id
str+="sno="+obj[i].value+"&";
}
str=str.substring(0, str.length-1);
location.href="${pageContext.request.contextPath }/RemoveMuchServlet?"+str;;
}
}
<a class="btn btn-default" href="javascript:void(0);" role="button" οnclick="test()">删除</a>