<!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. free online slots no download http://casinogamesmv.com/# indian casinos near me all free slots caesars slots

  2. free las vegas casino games casino bonus hollywood casino free slot play jack online casino

  3. http://playslotsndx.com/# lady luck online casino casino slot free freeslots.com slots free casino slots with bonuses

  4. buffalo gold slots slots lounge free slots with no download or registration google free casino slot games caesar casino free slots games

  5. real money casinos hypercasinos casinos online

  6. http://casinoslotsbcx.com/# usa casinos no deposit free welcome bonus free casino blackjack games empire city online casino casino slots

  7. best free slots no download http://playcasinostm.com/# online casino free games online slots casinos online

  8. http://casinoslotsww.com/# free online slots online casino slots online slots free casino games

  9. turning stone online slots http://casinogamesmv.com/# slots free online lady luck online casino free slots slotomania

  10. http://casinoonlinewwa.com/# wheel of fortune slots slot machine free lady luck sugarhouse online casino

添加新评论