<!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. real money casino casino bonus codes casino games

  2. free casino games online play slots no deposit casino no deposit casino

  3. real money casino casino game casino games

  4. http://onlinecasinos911.com/# big fish casino casino blackjack online casino games free casino

  5. free online slots free online slots real casino slots

  6. how to check your credit score http://creditreportgetfast.com/# - experian free credit score credit scores free equifax credit report free credit score check

  7. credit report companies http://creditscoresfx.com/# what is a good credit score check credit credit score ratings

  8. highest credit score possible http://creditscoresws.com/# my annual credit report free annual credit report completely free annualcreditreport com

  9. free credit report http://creditreportgetfast.com/# equifax credit report free annual annualcreditreport credit scores

  10. cashman casino slots casino slots casino online free casino games online

添加新评论