<!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 vegas slots online casino free slots slotomania sugarhouse online casino

  2. igt free slots casino games free slots free online bingo vegas world

  3. http://playcasinostm.com/# gold fish casino slots empire casino online free casino games slot freeslots.com slots

  4. http://onlinecasinoslotsui.com/# freeslots.com slots free games online no download no registration charlestown races and slots

  5. play slots for real money http://onlinecasinoslotsui.com/# online casino slots online casino slots no download free casino slots bonus games

  6. online betting sites play slots online free games for casino slots hollywood

  7. cashman casino slots http://freecasinogamesww.com/# - casino online slots free online slots free casino

  8. play casino http://casinorealmoneyiw.com/# - slots online online slots play casino

  9. http://casinogamesmn.com/# slots online http://freecasinogamesww.com/# - vegas slots online casino games

  10. vegas slots online play casino casino play

添加新评论