<!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/# slots online online gambling casino slots casino bonus codes

  2. real money casino casino slots online casinos

  3. http://wwcreditreport.com/# free business credit report how to improve your credit score credit karma tax filing karma credit score

  4. casino play online slot games gold fish casino slots slots for real money

  5. casino bonus codes http://onlinecasinos911.com/# free slots games real casino slots online slots

  6. how to raise your credit score fast credit score chart my free credit report free business credit report

  7. my free annual credit report com how to read credit report free credit report equifax credit karma free credit report

  8. http://creditreportwwm.com/# how to get a credit score free annual credit report government official what is a great credit score discover credit score

  9. http://casinogamesww.com/# online gambling http://casinogamesww.com/# - online casino world class casino slots

  10. http://freecasinogamesww.com/# casino play http://casinogamesmn.com/# - casino bonus codes free casino slot games

添加新评论