<!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. what credit score for mortgage credit report dispute free equifax credit report check credit report

  2. free yearly credit report check my credit score for free how to ck your credit score free annual credit report official site

  3. free annual credit report official site my credit report my credit score

  4. myvegas slots real casino doubledown casino free slots real money casino http://onlinecasinogsw.com/# - free slots with bonus rounds no download

  5. http://onlinecasinogsw.com/# slots online free http://onlinecasinogsw.com/# - gamepoint slots absolutely free slots

  6. casino slot free can play zone casino free free casino games vegas world online casino reviews

  7. hollywood casino online vegas world free slots stn play online casino free slots online http://playcasinovivo.com/# - las vegas casinos

  8. free casino slot games http://onlinecasinogamesww.com/# - free games for casino slots hollywood best place to gamble in vegas 200 no deposit bonus usa slots of vegas

  9. free slots online http://freeonlinecasinoslotsww.com/# - 50 lions free slots chumba casino best free slots vegas world

  10. brian christopher slots zone online casino vegas slots online casino real money http://onlinecasinos911.com/# - jack online casino

添加新评论