<!DOCTYPE html>
<html >
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>获取多选框的值</title>
    <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
  </head>
  <body>苹果:
    <input type="checkbox" name="id" value="aa">香蕉:
    <input type="checkbox" name="id" value="bb">橘子:
    <input type="checkbox" name="id" value="cc">
    <button id="btn">批量删除</button>
  </body>
  <script>
  $('#btn').click(function () {
    var id=[];
    $("input[name='id']:checked").each(function(){
      id.push($(this).val());
    });
    console.log(id);
  });
  </script>
</html>

标签: jquery

已有 2787 条评论

  1. slots games free online slots free slots

  2. best online casinos http://onlinecasinogamesww.com/# - online casinos online casino bonus casino slots

  3. http://casinoplaygm.com/# no deposit win real cash casino game free slots games vegas casino games

  4. free slots big fish casino download free 50 lions free slots high five casino slots zone online casino games

  5. http://bestcasinoww.com/# best online casinos http://freecasinogamesww.com/# - slots online free casino games

  6. free slots http://onlinecasinowps.com/# online casino real money gold fish casino slots online casino real money

  7. free slots no registration no download free slots vegas slots casino games hallmark casino online

  8. free slots vegas las vegas casinos free slots gossip slots

  9. http://onlinecasinoslotsui.com/# free casino games slot machines 100 free casino no deposit online casinos for us players

  10. hollywood casino free slot play free casino games slotomania casino slot free las vegas casino games online casino games

添加新评论