HTML 页面的 批量删除的按钮

时间:2023-03-09 16:59:22
HTML  页面的  批量删除的按钮
 function delAll(){
var sid="";
$("[name='ids']:checked").each(function(){
sid+=$(this).val()+",";
})
sid = sid.substring(0, sid.length - 1);
window.location.href="${path}/delAll.action?sid="+sid;
alert(sid)
}
//delAll.action
@RequestMapping("delAll.action")
public String delAll(String sid) {
String[] split = sid.split(",");
boolean flag=studentService.delAll(split);
System.out.println(flag);
return "redirect:get.action"; }
<delete id="delAll">
delete from student where sid in
<foreach collection="array" item="sids" close=")" open="(" separator=",">
#{sids}
</foreach>
</delete>

HTML  页面的  批量删除的按钮

HTML  页面的  批量删除的按钮