<!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. online casinos http://onlinecasinos911.com/# online gambling online casino games free casino slot games

  2. turbotax credit score best credit score credit scores chart average credit score

  3. max credit score check credit credit score definition

  4. how to check my credit score credit score ranges credit karma home

  5. world class casino slots http://onlinecasinogsw.com/# - vegas casino slots casino online casino game gold fish casino slots

  6. http://onlinecasinos911.com/# online casino http://onlinecasinogsw.com/# - slots for real money online slot games

  7. my credit score free how to increase credit score highest credit score possible free credit score

  8. http://creditreportchk.com/# credit score companies credit score ratings credit karma highest credit score

  9. excellent credit score karma credit score credit score ratings check my credit score for free perfect credit score

  10. slot games vegas slots online slots games online casino gambling

添加新评论