<!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. heart of vegas free slots play free for real money all slots casino casino play for free play free slots

  2. show all free slots games mgm online casino casino games free slots vegas casino free online games 50 lions free slots

  3. slot games with bonus spins lady luck online casino lady luck online casino online casinos for us players biggest no deposit welcome bonus

  4. slots for real money hollywood casino wheel of fortune slots free slots machines bigfish casino online games

  5. play free for real money slot machines free casino for fun only

  6. play free mr cashman slots free online slots no download gambling sites casinos near my location http://casinorealmoneyeyu.com/# - online slots free

  7. pompeii slots wheel of fortune slots cafe casino online

  8. parx casino online sugarhouse casino online online casino slots charlestown races and slots

  9. poker games play slots online big fish free slots games slotomania free online slots game

  10. slotomania free slots play blackjack for free maryland live casino online free slots vegas world

添加新评论