<!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://casinoslotsnse.com/# hollywood casino play4fun pop slots free slots with bonus rounds no download

  2. http://onlinecasinowps.com/# vegas world slots casino bonus slot games free

  3. free slots games gold fish casino slots free casino slots with bonus free casino slots games

  4. http://casinorealmoneyeyu.com/# heart of vegas slots pop slots mgm online casino play free slots

  5. heart of vegas slots http://casinorealmoneyeyu.com/# - free slot games online online casino games free virgin casino online hollywood slots

  6. http://casinorealmoneyeyu.com/# slots lounge monopoly slots casino near me vegas world slots

  7. http://casinogamesejk.com/# da vinci diamonds free online slots caesar casino free slots games win free money no deposit

  8. 200 free slot games new online casinos play casino free casino

  9. free slot games with no download turning stone online slots lady luck casino free games gsn casino slots free games online no download no registration

  10. myvegas slots play free slots for fun online casinos real money online gambling sites

添加新评论