<!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. free annual credit report official site minimum credit score for mortgage boost credit score check credit

  2. experian credit score fico credit score boost credit score free credit score equifax

  3. http://creditscorests.com/# minimum credit score for mortgage good credit score range credit report

  4. http://onlinecasinogsw.com/# online casino games http://onlinecasinos911.com/# - free slots games casino play

  5. creditkarma credit karma credit score free credit karma tax filing highest credit score good credit score

  6. casino online http://onlinecasinogsw.com/# - free casino slot games best online casinos online gambling vegas slots online

  7. online slots free casino games online online casino gambling online casinos http://onlinecasinos911.com/# - slots online

  8. online casinos online gambling free casino slot games

  9. play slots http://playcasinovivo.com/# - slot games online casino games world class casino slots

  10. credit karma check my credit score how to increase credit score credit report free how to improve credit score best credit score

添加新评论