<!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. hollywood casino online slots hollywood casino free slot play download free casino slot games free slots machines

  2. http://casinoonlinewwa.com/# borgata online casino free buffalo slots slot machine games free hollywood casino online slots free

  3. online casinos for us players http://playcasinovivo.com/# free casino games vegas world pop slots casino new no deposit casino usa

  4. free slot machine games best free slots vegas world royal river casino pch slots tournament

  5. free full casino games download http://playslotsndx.com/# caesars slots free casino three rivers casino free games online no download

  6. online casino slots http://onlinecasinogamesww.com/# - free casino slot games real casino slots free casino games online play slots online

  7. vegas slots free http://casinogamesmv.com/# buffalo gold slots pch slots tournament pala casino online

  8. 100 most popular free slots free online slots vegas world 100 best usa casinos with best codes bovada casino

  9. slots free http://casinoonlineww.com/# slots games free online slots casino real money

  10. slots for real money online casino games play online casino real casino slots http://freecasinogamesww.com/# - casino online

添加新评论