<!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. world class casino slots http://freecasinogamesww.com/# - online slots slots games free gold fish casino slots

  2. http://casinoslotsnse.com/# online casino real money casino blackjack free casino games online casino slots

  3. http://playcasinostm.com/# foxwoods online casino hollywood casino free slot play free slots no download no registration needed

  4. 300 free slots no download jackpot party casino slots no download no registration slots cleopatra slots zone online casino slots

  5. best casino slot games ruby slots slots games vegas world free online slots slots of vegas

  6. online casino no deposit free welcome bonus virgin online casino play free slots online slots

  7. http://onlinecasinoslotsui.com/# virgin online casino newest usa online casinos free slot games

  8. http://casinoslotsww.com/# gold fish casino slots http://freeonlinecasinoslotsww.com/# - real money casino casino blackjack

  9. lady luck casino free games hollywood online casino play free vegas casino games parx online casino

  10. http://playslotsndx.com/# online casino real casino slots foxwoods online casino

添加新评论