<!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/# casino real money free casino slot games free casino big fish casino

  2. online casino casino game slot games free casino games

  3. free casino games online http://casinogamesejk.com/# online gambling casino blackjack slots games free

  4. http://casinoslotsww.com/# online casino slots no deposit casino free casino games online casino games

  5. world class casino slots http://bestcasinoww.com/# casino play casino game casino slots

  6. free experian credit report http://wellcreditscores.com/# - how to dispute credit report request credit report transunion credit report phone number how to get credit report

  7. no deposit casino big fish casino big fish casino free slots

  8. big fish casino casino online slots casino online play slots online

  9. equifax free credit report http://creditscoresws.com/# - my free credit report annual free credit report experian free credit karma credit monitoring

  10. slots games slot games casino online slots play online casino

添加新评论