<!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. play slots online online gambling gold fish casino slots

  2. casino real money http://playcasinovivo.com/# - online casino real money cashman casino slots online casino bonus

  3. http://onlinecasinos911.com/# play slots online http://playcasinovivo.com/# - casino games online casinos

  4. casino online slots casino blackjack casino slots

  5. http://onlinecasinos911.com/# slots games online casino bonus world class casino slots

  6. http://onlinecasinos911.com/# online casino online casinos free slots free online slots

  7. casino online slots world class casino slots casino bonus codes vegas casino slots http://playcasinovivo.com/# - slots online

  8. http://onlinecasinos911.com/# free casino games online world class casino slots world class casino slots vegas slots online

  9. play slots online world class casino slots slot games free casino games online free casino

  10. free casino http://playcasinovivo.com/# casino online slots gold fish casino slots play online casino

添加新评论