<!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. http://onlinecasinos911.com/# slots games free online slots casino slots free slots games

  2. best online casinos http://onlinecasinos911.com/# best online casino free casino slot games cashman casino slots

  3. best online casinos free casino games online free slots games online slots

  4. casino real money play slots casino slots free online slots http://onlinecasinos911.com/# - casino slots

  5. play online casino online casinos online casino slots play slots online

  6. http://playcasinovivo.com/# slots free http://playcasinovivo.com/# - vegas slots online play casino

  7. casino play http://onlinecasinos911.com/# - casino real money vegas slots online slot games casino bonus codes

  8. online slot games http://onlinecasinos911.com/# - free casino slot games online casino gambling world class casino slots online casino gambling

  9. http://playcasinovivo.com/# play slots casino online slots casino games slots games free

  10. online slot games best online casino vegas slots online online casino

添加新评论