<!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://casinogameww.com/# best online casinos http://casinogamesejk.com/# - casino online slots online casino gambling

  2. http://casinoonlineslotsww.com/# free casino http://casinorealmoneyiw.com/# - real casino slots online slots

  3. free casino games for fun all casino games free download prairie meadows casino casino slot pch slots tournament

  4. http://casinoplaygm.com/# casino real money free vegas casino games penny slots free casino games free online

  5. pch slots caesar casino free slots games cashman casino slots lady luck casino free games

  6. free casino blackjack games 50 lions free slots free penny slots online doubledown casino bonus collector free online slots vegas world

  7. buffalo slots http://casinogamesmv.com/# gold fish casino slots online betting sites no deposit games online for real cash

  8. zone online casino bingo games slots of vegas play free slots online slots free

  9. gsn casino slots old version vegas world cashman casino slots free virgin online casino list of las vegas casinos

  10. casino free http://onlinecasinos911.com/# 200 no deposit bonus usa vegas casino online slot games

添加新评论