<!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. real casino slot machine games hollywood casino online casino no deposit free welcome bonus all games list free slots http://onlinecasinogamesww.com/# - real money casino

  2. lady luck casino caruthersville casino games free slots free

  3. caesars online casino http://onlinecasinos911.com/# hot shot casino slots jackpot magic slots download pala casino online

  4. vegas world free games online slots http://onlinecasinos911.com/# - free blackjack games casino style borgata online casino free slot machines slot machines for home entertainment

  5. pop slots casino free slot games download full version slots online free

  6. free online credit score free credit karma credit score definition free annual credit report free annual credit report free

  7. http://freecreditreporthh.com/# credit check free credit score checker annual credit report completely free government business credit report

  8. free slots no registration online casino bonus free online casino games vegas

  9. http://freeonlinecasinoslotsww.com/# free slot machine games http://casinogamesww.com/# - freeslots.com slots vegas casino free slot games

  10. http://casinoonlineslotsww.com/# paradise casino vegas world slots play free slots best free slots no download

添加新评论