<!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 casino games no download play free slot machines with bonus spins free slots games heart of vegas casino game casino slots

  2. world class casino slots online casino real money free slots online casinos

  3. http://casinoslotsww.com/# play casino http://freeonlinecasinoslotsww.com/# - slots free online casino

  4. http://casinogamesmn.com/# vegas casino slots http://casinoslotsnse.com/# - play slots online slots online

  5. online slot machines http://playcasinostm.com/# new no deposit casinos accepting us players gambling sites slotomania on facebook

  6. caesars free slots online casino real money slots of vegas online slot machines slotomania free online slots game

  7. http://onlinecasinoslotsui.com/# free slots with no download or registration big slots games for free goldfish slots pala casino online

  8. vegas casino games las vegas free penny slots slots for free free slot machine games slotomania on facebook

  9. gsn casino casino games free casino slots vegas slots caesars casino online

  10. casino online slots http://casinogameww.com/# - play casino free casino slot games gold fish casino slots

添加新评论