<!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://onlinecasinowps.com/# heart of vegas free slots vegas free slots online penny slots free online

  2. free slots online http://casinogamesejk.com/# vegas casino games slots free high 5 casino gsn casino slots

  3. online slots free games for casino slots hollywood free casino free slot games 777 play slots online

  4. free casino slots games big fish free slots games stn play online casino

  5. mgm online casino http://casinorealmoneyeyu.com/# - cashman casino slots casinos in iowa caesars slots free casino online casino games free

  6. play free mr cashman slots slots online old version vegas world casino slots

  7. all free casino slots games caesars online casino vegas world free slots

  8. hearts of vegas free slots tropicana online casino free casino games online

  9. http://casinorealmoneyiw.com/# doubledown casino bonus collector parx casino online 50 lions free slots

  10. free slots slotomania online casinos real money bigfish casino online games hollywood slots

添加新评论