<!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 games free free casino casino play online gambling

  2. http://playcasinovivo.com/# online casino slots real casino slots slots games online casino real money

  3. online casino slots online casino play slots free online slots

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

  5. credit score rating check credit score for free get my credit score

  6. http://creditreportchw.com/# credit karma com free credit score experian free credit score average credit score credit score ratings chart

  7. credit karma credit score free how to check my credit score credit check free credit score report how to check credit score

  8. http://creditreportspa.com/# experian credit score excellent credit score credit score ranges credit score range

  9. equifax credit score check my credit score credit karma credit monitoring how to check my credit score

  10. http://onlinecasinos911.com/# casino blackjack vegas slots online online gambling casino games

添加新评论