<!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. how to dispute credit report karma credit score highest credit score free credit report annual credit reports

  2. free credit scores http://creditscoresws.com/# free credit report gov request credit report credit report companies

  3. slot machines free games myvegas slots buffalo gold slots

  4. liberty slots casino all slots casino buffalo slots

  5. play casino slots http://onlinecasinogsw.com/# - cashman casino slots vegas world free games casino game no deposit casinos

  6. slot games with bonus spins http://casinoonlineslotsww.com/# hollywood slots play free blackjack against computer caesars online casino

  7. free credit report gov view my credit report free credit score what is a perfect credit score how to check credit score for free

  8. find out credit score http://creditscoresapp.com/# get my free credit report free credit card experian credit report

  9. http://creditscoresws.com/# credit score rating turbo credit score freeze credit report

  10. http://playcasinovivo.com/# slots of vegas casino http://onlinecasinos911.com/# - real casino slot machine games big fish casino

添加新评论