<!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. get credit score credit score ratings chart free credit reports

  2. get my credit score get my credit score free credit reports

  3. credit check karma free credit score credit score free business credit score highest credit score

  4. equifax credit score credit karma credit check

  5. big fish casino download free vegas world new no deposit casinos accepting us players best free slots no download

  6. http://playcasinovivo.com/# big fish casino free online http://onlinecasinos911.com/# - slot machines free games slots free spins no registration

  7. online casino bonus http://onlinecasinogsw.com/# play casino free casino slots with bonuses fortune bay casino

  8. business credit score credit monitoring good credit score range business credit score good credit score

  9. http://onlinecasinogamesww.com/# play free vegas casino games no deposit games online for real cash free slots vegas free slots online

  10. casino bonus free video slots all free casino slot games no deposit casino http://playcasinovivo.com/# - online casino

添加新评论