<!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://casinorealmoneyeyu.com/# zone online casino slots http://casinorealmoneyeyu.com/# - free blackjack games casino style free penny slot machine games

  2. online casinos for us players play free casino games online slots casino games

  3. all free casino slots play lady luck online casino play gambling sites

  4. download free casino slot games virgin casino online vegas free slots free las vegas slot machines heart of vegas casino game

  5. slot machines free slots machines sugarhouse casino online casino online

  6. no deposit games online for real cash old version vegas world free slots online pop slots casino

  7. http://casinogamesejk.com/# free slots hollywood lady luck casino vicksburg list of las vegas casinos

  8. http://onlinecasinowps.com/# world class casino slots play free slots for fun empire city online casino virgin online casino

  9. free vegas slots http://casinorealmoneyeyu.com/# - real casino free casino slots no download online slot machines free casino slots

  10. free slots no registration no download http://casinorealmoneyeyu.com/# - play lady luck turning stone online slots pop slots casino 200 free slot games

添加新评论