<!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. gold fish casino slots newest usa online casinos free slot games with no download free slots games

  2. http://casinorealmoneyeyu.com/# casino slots free slots for real money free no deposit usa no deposit casino bonus codes play casino games for free

  3. free online casino games vegas lady luck online casino slots free games

  4. caesar casino free slots games absolutely free slots free games online slots

  5. http://casinoslotsnse.com/# las vegas free penny slots charlestown races and slots play free casino slots now pop slots casino

  6. lady luck casino vicksburg virgin online casino free slots no registration no download play free win real cash 888 casino online

  7. free penny slots online http://casinogamesejk.com/# zone online casino games free vegas casino games online slots real money

  8. http://casinorealmoneyeyu.com/# free slots vegas world play casino games for free liberty slots royal river casino

  9. free casino games with bonus free slot play best place to gamble in vegas prairie meadows casino big fish casino

  10. casino bonus no deposit games online for real cash liberty slots casino

添加新评论