<!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/# no deposit casino casino game play slots online

  2. online casino bonus online gambling online casino gambling

  3. world class casino slots online slots best online casino

  4. casino online slots online casinos best online casinos vegas slots online

  5. vegas casino slots http://casinoonlineww.com/# - online gambling real money casino casino online casino bonus codes

  6. online casino real money http://onlinecasinowps.com/# - gold fish casino slots casino blackjack online casinos

  7. free casino play slots no deposit casino online gambling

  8. free slots games play slots online vegas slots online casino play

  9. consumer credit report http://wellcreditscores.com/# - how to get free credit report check credit score free business credit report experian business credit report

  10. mint credit score http://getcreditscoreww.com/# - credit report companies my credit report how to check your credit score check credit score free

添加新评论