<!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://onlinecasinowps.com/# casino online slots slot games real money casino slots games free

  2. free online slots vegas casino slots play casino casino games http://casinobonuscodesww.com/# - casino real money

  3. http://casinoonlineww.com/# vegas slots online http://bestcasinoww.com/# - best online casinos online casinos

  4. http://freecasinogamesww.com/# play slots free online slots slots games gold fish casino slots

  5. online casino no deposit casino free online slots

  6. casino slots casino online slots real casino slots online casino games free casino

  7. http://creditreportchecknow.com/# annualcreditreport com official website how to check credit score credit sesame credit karma free credit score

  8. experian credit report experian plc social credit score how to improve credit score

  9. credit rating check http://creditreportgetnow.com/# - what is a credit score how to increase credit score free experian credit report

  10. credit reporting agencies http://wellcreditscores.com/# credit karma check my credit score credit score ratings chart check my credit score

添加新评论