<!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 online http://casinorealmoneyeyu.com/# - real casino slots online casino bonus online casino gambling no deposit casino

  2. no deposit bonus codes for usa players http://playcasinovivo.com/# free online slots vegas world best casino slot games online casinos for us players

  3. casinos online new online casinos free online casino games free slot games new no deposit casinos accepting us players

  4. gsn casino casino blackjack best online gambling sites for real money best free slots no download

  5. casino games free slots casino real money 300 free slots no download 888 casino online

  6. caesars free slots free vegas world slots heart of vegas slots 200 no deposit bonus usa goldfish slots

  7. play casino http://casinogamesejk.com/# - online casino bonus free casino slot games casino games

  8. 200 free slot casino games vegas slots online free casino slot machine games casino slot simslots free slots

  9. mgm online casino infinity slots slot machine free play free slots

  10. http://casinoslotsnse.com/# casino slots online gambling cashman casino slots online casino games

添加新评论