<!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://playcasinovivo.com/# zone casino vegas world casino slots high five casino slots free slot play no download

  2. credit reporting credit score simulator transunion credit report phone number view my credit report free experian credit report

  3. check credit score http://1creditscoreresults.com/# request credit report good credit score experian credit

  4. http://onlinecasinos911.com/# vegas slots http://onlinecasinogsw.com/# - casinos near me play online casino games

  5. http://creditscoresapp.com/# credit check how do i check my credit score annual credit score annual credit report free

  6. new online casinos http://casinoonlineslotsww.com/# - jackpot party casino slots parx casino online sugarhouse casino online

  7. free casino games for fun mohegan sun free online slots vegas casino slots hyper casinos http://freeonlinecasinoslotsww.com/# - vegas world casino games

  8. hallmark casino online slots for free free casino games for fun

  9. free slot machine games wheel of fortune slots slots online casino online http://casinogamesww.com/#

  10. big slots games for free http://playcasinovivo.com/# las vegas free slots real vegas casino games free play free slots

添加新评论