<!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://onlinecasinos911.com/# slots free casino blackjack casino real money casino real money

  2. gold fish casino slots http://onlinecasinos911.com/# online slots casino game online casino slots

  3. http://casinogamesejk.com/# play online casino casino bonus codes casino game play slots

  4. play slots online casino free slots games free casino games online

  5. http://nodepositcasinoww.com/# casino online slots http://nodepositcasinoww.com/# - casino game slot games

  6. no deposit casino play casino vegas slots online online casino slots

  7. how to improve my credit score http://creditreportchecknow.com/# good credit score range annual credit report completely free government credit score ratings

  8. best credit score credit score simulator free credit report transunion check my credit report http://creditscoresws.com/# - get free credit report

  9. transunion credit report phone number http://getcreditscoreww.com/# credit score ratings turbo credit score free credit score karma

  10. http://creditreportgetfast.com/# how to dispute credit report http://creditscorecheckn.com/# - how to get credit report free credit report equifax

添加新评论