<!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. vegas world free games http://casinogamesww.com/# - free las vegas slot machines casino vegas world vegas slots online free

  2. http://casinoonlineslotsww.com/# slot machine free http://onlinecasinogamesww.com/# - cleopatra slots vegas slots casino

  3. http://creditscoresws.com/# free annual credit report official site get my credit report boost credit score credit scores free

  4. truly free credit scores online credit report business credit report how to increase credit score

  5. can play zone casino free http://playcasinovivo.com/# - free slot games with no download slotomania free slots quick hits free slots hallmark casino online

  6. all free casino slots games virgin casino online poker games vegas world casino games free http://onlinecasinos911.com/# - free vegas slots

  7. http://onlinecasinogsw.com/# best online casinos las vegas casinos free slots us online casinos for real money caesars slots

  8. annual credit report completely free government credit karma free credit score free credit score check credit karma credit report credit reports

  9. free credit fico credit score free credit report and scores

  10. hollywood slots bigfish casino online games doubledown casino

添加新评论