<!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://playcasinovivo.com/# casino bonus codes http://playcasinovivo.com/# - slots games free casino bonus codes

  2. http://onlinecasinos911.com/# vegas casino slots free slots gold fish casino slots casino online

  3. online casino real money casino real money online casino real money online casino games http://onlinecasinos911.com/# - casino online slots

  4. http://playcasinovivo.com/# free slots http://onlinecasinogsw.com/# - online casino cashman casino slots

  5. slots games free slot games casino blackjack online casino real money

  6. transunion credit score check my credit score for free credit karma credit score free

  7. free credit score experian how to check your credit score check my credit score for free free credit score karma credit score ratings chart

  8. http://creditscorewww.com/# how to raise credit score credit karma credit score credit karma free credit score max credit score

  9. casino blackjack casino slots online casino real money

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

添加新评论