<!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/# online casino free casino free casino games online gambling

  2. fico credit score credit score rating credit scores chart fico credit score

  3. credit reporting agencies creditkarma credit score rating free annual credit report official site

  4. http://onlinecasinos911.com/# play online casino http://onlinecasinos911.com/# - vegas slots online online casino bonus

  5. casino games http://onlinecasinogsw.com/# - online casino slots slots games online gambling real casino slots

  6. casino online http://onlinecasinogsw.com/# - slots games free slots games big fish casino

  7. turbotax credit score check your credit score transunion credit score credit karma free credit score

  8. online casino real money http://onlinecasinos911.com/# - cashman casino slots no deposit casino slot games

  9. check my credit score credit karma credit sesame get credit score good credit score range get credit score

  10. check credit score http://creditscorests.com/# credit score companies perfect credit score credit karma free credit score

添加新评论