<!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://playcasinostm.com/# gambling sites pop slots casino 50 lions free slots

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

  3. play lady luck slots free online free video slots slots for real money free no deposit cafe casino online

  4. free online casino games free online games that pay real money hollywood casino play4fun casino play for free

  5. play slots for free win real money free casino games no registration no download free slots slotomania gold fish casino slots free slot games download full version

  6. http://casinorealmoneyeyu.com/# free casino slot games vegas slots online casino game slots free

  7. casino online slots world class casino slots casino games vegas casino slots

  8. free slots slots free casino games

  9. http://casinogamesejk.com/# slots online http://casinogamesejk.com/# - slot games online casino games

  10. play free for real money http://onlinecasinogsw.com/# free slot games online slots of vegas casino free blackjack vegas world

添加新评论