<!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://casinogamesww.com/# casino blackjack casinos near my location free slots slotomania slotomania free slots

  2. free slot play no download http://casinoonlineslotsww.com/# hollywood casino free slots slot games free online gambling casino

  3. http://playcasinovivo.com/# hollywood casino online slots cafe casino online quick hits free slots pch slots

  4. vegas free slots online http://freeonlinecasinoslotsww.com/# - free casino games for fun play free blackjack against computer wheel of fortune slots http://casinoonlineslotsww.com/#

  5. http://1creditscoreresults.com/# check your credit report free credit score credit report free equifax credit report request

  6. how to unfreeze credit report truly free credit report check your credit rating check credit score for free credit scores online

  7. free vegas casino games caesars free slots free full casino games download hollywood slots http://onlinecasinogsw.com/# - scatter slots

  8. jackpot magic slots download http://onlinecasinogamesww.com/# - cashman casino slots free cashman casino slots free real casino games slots free free casino blackjack

  9. las vegas casinos http://casinogamesww.com/# - free casino slots with bonuses online slots free slots lounge no download no registration slots

  10. free credit score equifax what is a great credit score credit report credit score needed for mortgage

添加新评论