<!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. usa online casino mgm online casino play free vegas casino games play free win real cash http://casinorealmoneyeyu.com/# - liberty slots casino

  2. http://casinorealmoneyeyu.com/# cashman casino slots slots free spins no registration free slot machines slotomania on facebook

  3. http://casinorealmoneyeyu.com/# free games online no download http://casinorealmoneyeyu.com/# - online casino online slots

  4. http://onlinecasinowps.com/# jackpot magic slots download lady luck casino vicksburg caesars casino online

  5. heart of vegas free slots free slots machines play free slots

  6. hollywood online casino casino slots free games new no deposit casinos accepting us players free casino for fun only

  7. real casino slot machine games 300 free slots no download no registration doubledown casino free slots casino games

  8. http://casinogamesejk.com/# newest usa online casinos pechanga casino heart of vegas slots lady luck

  9. parx online casino http://casinorealmoneyeyu.com/# - all casino games free download foxwoods casino online real casino slots free online slots

  10. penny slots myvegas slots free slots casino games best casino slots online vegas world free slots games

添加新评论