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

  2. casino play http://playcasinovivo.com/# - online casino games play slots online online slot games play slots online

  3. free slots games http://playcasinovivo.com/# - casino game casino bonus codes slots for real money

  4. casino bonus codes casino online slots online casino bonus slots for real money http://playcasinovivo.com/# - online casino bonus

  5. http://onlinecasinos911.com/# slots free http://playcasinovivo.com/# - free casino slot games free slots games

  6. play slots http://playcasinovivo.com/# - slots free cashman casino slots slots games free

  7. http://playcasinovivo.com/# slot games http://onlinecasinos911.com/# - online slots online casino

  8. casino online slots http://playcasinovivo.com/# - free casino games online play slots online online slot games

  9. slots free http://onlinecasinos911.com/# - online gambling free casino games online casino slot games

  10. free online slots http://onlinecasinos911.com/# casino real money casino real money casino blackjack

添加新评论