<!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. prairie meadows casino zone online casino slots free casino games online sizzling 777 slots free online free online slots games

  2. slots for real money http://playslotsndx.com/# slot machines free games online casino bonus slots for real money

  3. old vegas slots play slots casino bonus free online slots no download no registration

  4. http://casinorealmoneydwq.com/# casino online slots all games list free slots gsn casino

  5. free casino games online http://casinogamesww.com/# - online casino real money casino slots free slots

  6. slots free play casino online casino bonus online casino gambling http://playcasinoww.com/# - free casino games online

  7. http://casinobonuscodesww.com/# real casino slots world class casino slots free casino games best online casino

  8. best online casinos slot games best online casinos cashman casino slots

  9. http://onlinecasinogamesww.com/# online casino online casinos online casino games casino online slots

  10. 200 no deposit bonus usa free slots with bonus rounds no download casino play for free totally free slots no download casino games slots free

添加新评论