function delAll(){
         var s;
         $("[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 >
        delete from student where sid in 
            <foreach collection="array" item="sids" close=")" open="(" separator=",">
                #{sids}
            </foreach>
    </delete>

 

HTML  页面的  批量删除的按钮

HTML  页面的  批量删除的按钮

 

相关文章:

  • 2022-12-23
  • 2021-05-25
  • 2022-12-23
  • 2022-02-08
  • 2022-12-23
  • 2021-07-24
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-27
  • 2022-12-23
  • 2021-06-24
  • 2021-07-21
  • 2021-05-30
相关资源
相似解决方案