<!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 gambling http://onlinecasinos911.com/# big fish casino online casino real casino slots

  2. casino online slots cashman casino slots casino bonus codes

  3. vegas casino slots http://casinoslotsww.com/# - casino bonus codes online gambling online gambling free slots

  4. http://casinogamesejk.com/# play casino real money casino casino bonus codes free slots

  5. online slot games online slots slot games

  6. online gambling http://casinorealmoneyeyu.com/# - big fish casino slots free cashman casino slots

  7. http://onlinecasinogamesww.com/# slots online http://casinoslotsnse.com/# - online casino casino game

  8. slots free slots free best online casinos real casino slots casino game

  9. free casino games world class casino slots online slot games play slots

  10. credit bureau reports http://creditscoresws.com/# - my credit score get my credit score credit scoring

添加新评论