<!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. no deposit casino casino game world class casino slots online gambling

  2. cashman casino slots http://onlinecasinos911.com/# real casino slots play slots world class casino slots

  3. http://casinoonlineww.com/# free casino games online casino slots casino real money big fish casino

  4. http://onlinecasinogamesww.com/# vegas slots online http://onlinecasinogamesww.com/# - gold fish casino slots real money casino

  5. free casino online gambling casino blackjack best online casino

  6. casino bonus codes http://bestcasinoww.com/# - cashman casino slots gold fish casino slots no deposit casino best online casinos

  7. http://creditscoresids.com/# boost my credit score consumer credit report what is a perfect credit score experian credit

  8. http://creditreportchecknow.com/# credit score online free annual credit report official site my credit report experian plc

  9. what is the highest credit score possible free credit karma credit score scale consumer credit report http://creditreportuss.com/# - my credit score

  10. annual credit report completely free experian http://creditreportchecknow.com/# - check credit rating my credit report good credit score range http://wellcreditscores.com/#

添加新评论