<!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. online gambling online slots online slots free casino games

  2. free casino games play casino play casino casino play vegas casino slots

  3. http://onlinecasinos911.com/# free slots real money casino online slots

  4. http://creditscorecheckn.com/# my annual credit report http://creditreportgetnow.com/# - check credit score free free annual credit report government official

  5. slots games free vegas slots online vegas slots online online casino gambling

  6. online casino bonus free casino best online casino cashman casino slots casino blackjack

  7. online slots http://onlinecasinos911.com/# casino blackjack no deposit casino slots free

  8. http://1creditscores.com/# free credit score karma http://creditreportwwm.com/# - credit karma check my credit score free credit report annual

  9. http://creditscoresids.com/# credit reporting check credit score my free annual credit report com what is a good credit score number

  10. what is credit score transunion free credit report karma free credit score what is an excellent credit score http://creditscoresids.com/# - free credit report annual

添加新评论