<!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. online casino gambling http://playcasinoww.com/# - best online casinos free casino games real casino slots

  2. casino play for free online gambling online slot machines igt free slots free slots just for fun no money

  3. atari vegas world free slots free slot play no download old vegas slots casino online

  4. big fish casino http://casinoplaygm.com/# play free casino games online play blackjack for free free vegas casino games

  5. gsn casino play free slots pch slots tournament hallmark casino online vegas world free games online slots

  6. free casino games no registration no download all free casino slots games wizard of oz slots play free win real cash casino games no download no registration

  7. play slots free slots games online casino casino blackjack http://freecasinogamesww.com/# - free slots

  8. online casino gambling http://bestcasinoww.com/# - free casino online slots play slots online

  9. free casino games http://onlinecasinowps.com/# - online gambling online casino gambling world class casino slots

  10. gold fish casino slots http://casinogamesmn.com/# play casino free slots games online slot games

添加新评论