<!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. http://casinogamesejk.com/# doubledown casino sugarhouse online casino casino free big fish casino slots

  2. http://casinorealmoneyiw.com/# slots of vegas casino lady luck online casino free online casino games

  3. ruby slots vegas world casino games free free games for casino slots hollywood

  4. parx online casino casino vegas world free blackjack vegas world slot machines

  5. vegas casino games absolutely free casino slots games online casino games slotomania free online slots game free slots slotomania

  6. free slots slotomania free slots play free for real money biggest no deposit welcome bonus hollywood casino free slot play

  7. http://casinogamesejk.com/# vegas world free slots games online slots real money online slot machines

  8. freeslots.com slots online casino no deposit free welcome bonus free slots vegas world online gambling for real money big fish casino slots

  9. free games online no download no registration http://casinorealmoneyiw.com/# casino real money free online casino slots casino games no download no registration

  10. free slots with no download or registration no deposit casino free casino slots play free slot machines with bonus spins

添加新评论