<!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://casinoonlineww.com/# casino slots online casino slots slots free vegas casino slots

  2. http://freeonlinecasinoslotsww.com/# free slots http://casinogamesww.com/# - slots online online casino slots

  3. free online slots cashman casino slots online casino real money

  4. real money casino gold fish casino slots free slots games best online casinos slots free

  5. free slots games free online slots play casino online slots online casino slots

  6. all games list free slots 100 no deposit bonus codes play blackjack for free las vegas casinos slots machines

  7. slots casino games play online casino online gambling for real money jackpot magic slots download

  8. online casino http://casinorealmoneyiw.com/# - online casino slots vegas casino slots world class casino slots real money casino

  9. real casino slots online casinos free casino

  10. http://casinoonlineslotsww.com/# best online casino http://nodepositcasinoww.com/# - no deposit casino best online casinos

添加新评论