<!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 reviews online casino gambling free slot games 777

  2. free casino slots with bonus show all free slots games online casino no deposit free welcome bonus free slot games

  3. all free slots vegas casino online empire city online casino

  4. free casino games no download http://casinorealmoneyeyu.com/# - play free win real cash vegas slots casino vegas world slots for real money

  5. free casino slot games online casino games free casino slots free games zone online casino games foxwoods online casino

  6. empire city casino online vegas casino free online games slots games slots of vegas

  7. online casino reviews online gambling for real money best online casino

  8. slotomania slot machines buffalo gold slots caesars slots free casino free slots no download no registration needed

  9. http://casinorealmoneyeyu.com/# play free for real money borgata online casino borgata online casino posh casino online

  10. http://casinorealmoneyeyu.com/# foxwoods online casino http://casinorealmoneyeyu.com/# - real vegas casino games free online casino gambling

添加新评论