<!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. slots free casino real money online casino real money casino real casino slots

  2. world class casino slots real money casino online gambling online casino real money slots for real money

  3. casino game http://onlinecasinos911.com/# online gambling play slots online best online casino

  4. http://onlinecasinos911.com/# slots online online casinos slots games free free casino games

  5. best online casinos http://onlinecasinos911.com/# slot games no deposit casino real money casino

  6. best online casino online gambling play slots slots games free slots

  7. casino real money no deposit casino free slots games slots games real money casino

  8. slot games http://onlinecasinowps.com/# - slots free slots online casino online casino online

  9. slots for real money http://casinogamesmn.com/# - online casinos real casino slots play online casino

  10. http://casinogameww.com/# slots games http://casinogamesejk.com/# - slots free vegas slots online

添加新评论