<!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. real casino slots http://onlinecasinogsw.com/# - play casino free online slots free casino games online casino bonus

  2. credit score definition free annual credit report official site average credit score credit score simulator credit score ranges

  3. get credit score my credit score free credit score companies free credit score experian

  4. http://creditscorechecknw.com/# credit bureau my credit score free credit scores

  5. free casino games online online casino gambling online slot games casino game http://playcasinovivo.com/# - casino game

  6. slots for real money http://onlinecasinos911.com/# free casino games online casino online online casino

  7. how to check your credit score free credit score karma credit score free my credit score free

  8. http://creditscorewww.com/# credit bureau good credit score range check credit score for free free annual credit report official site

  9. http://onlinecasinogsw.com/# world class casino slots http://onlinecasinos911.com/# - cashman casino slots casino slots

  10. real money casino http://playcasinovivo.com/# - online casino gambling vegas slots online slots online

添加新评论