<!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. download free casino slot games http://onlinecasinos911.com/# - free vegas slots play online casino old vegas slots

  2. jack online casino http://casinogamesww.com/# - connect to vegas world empire city casino online free hollywood casino online slots play slots for real money

  3. http://casinogamesww.com/# play free slots virgin online casino slots free parx casino online

  4. las vegas casinos free slots http://casinoonlineslotsww.com/# - casino near me free casino slots with bonus free slots no download no registration

  5. karma credit score credit score scale credit karma check my credit score perfect credit score check credit score for free

  6. max credit score highest credit score how to increase credit score karma free credit score

  7. discover credit score free credit score experian credit check credit score free

  8. credit scores chart check your credit score free annual credit report official site karma credit score check my credit score

  9. msn games zone online casino slots free online casino blackjack slot machines http://playcasinovivo.com/# - lady luck

  10. casino games free freeslots.com slots buffalo gold slots poker games

添加新评论