<!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://onlinecasinos911.com/# free online slots best online casino online casino gambling

  2. online gambling http://onlinecasinos911.com/# best online casino casino slots free casino

  3. http://onlinecasinos911.com/# online casino slots online casino gambling play slots online

  4. equifax credit score http://wellcreditscores.com/# - my free credit report annual how to get credit report free credit check report how to get a free credit report

  5. business credit report karma credit score what is a great credit score

  6. experian free credit score http://creditreportgetfast.com/# - experian credit report credit bureau credit reporting how to increase your credit score fast

  7. http://onlinecasinos911.com/# free online slots casino online real casino slots online casino bonus

  8. online casino games http://casinogamesww.com/# casino online slots play slots casino game

  9. http://nodepositcasinoww.com/# slots for real money online casino slots casino online slots casino blackjack

  10. casino play http://nodepositcasinoww.com/# - big fish casino cashman casino slots real casino slots best online casinos

添加新评论