<!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. play slots online http://freeonlinecasinoslotsww.com/# play online casino games real vegas casino games free free casino slots with bonuses

  2. http://freeonlinecasinoslotsww.com/# free slots with bonus rounds no download http://onlinecasinogamesww.com/# - online casino bonus free online casino

  3. mint credit score credit report scores chase credit score my credit score

  4. http://creditscoresapp.com/# credit karma credit score free good credit score range check your credit rating check credit report

  5. slot machines free casino slot games free online slots casino near me

  6. scatter slots simslots free slots casino games online 200 free slot games http://freeonlinecasinoslotsww.com/# - real money casinos

  7. http://onlinecasinogsw.com/# tropicana online casino http://playcasinovivo.com/# - 300 free slots of vegas biggest no deposit welcome bonus

  8. http://playcasinovivo.com/# vegas world casino games http://onlinecasinogsw.com/# - high five casino slots high 5 casino

  9. free casino games slot machines vegas casino free slot games jackpot magic slots download

  10. free online slots no download no registration http://playcasinovivo.com/# - play slots online vegas slots casino games free

添加新评论