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

  2. real casino slots casino real money vegas slots online online casinos

  3. free casino games http://playcasinovivo.com/# free casino slot games cashman casino slots free casino games

  4. vegas casino slots free online slots free slots online slot games

  5. http://onlinecasinos911.com/# vegas slots online casino real money real casino slots

  6. free casino slot games casino blackjack free slots

  7. casino blackjack http://playcasinovivo.com/# world class casino slots real casino slots no deposit casino

  8. play slots casino play vegas slots online casino games slots free

  9. http://onlinecasinos911.com/# online gambling online casino gambling cashman casino slots free slots games

  10. casino online casino online casino bonus codes online casino bonus http://playcasinovivo.com/# - play casino

添加新评论