<!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. slots for real money http://playcasinovivo.com/# - online gambling online casino slots slots games

  2. http://creditscoreusd.com/# get my credit score free credit score fico credit score credit scores

  3. slots for real money http://playcasinovivo.com/# vegas slots online free slots games no deposit casino

  4. boost credit score http://creditreportchw.com/# check my credit score for free credit report how to raise credit score

  5. highest credit score possible http://creditreportsww.com/# credit scores boost credit score credit score chart

  6. http://playcasinovivo.com/# free casino http://playcasinovivo.com/# - online casino slots online casino bonus

  7. http://playcasinovivo.com/# free slots http://onlinecasinogsw.com/# - casino slots best online casinos

  8. http://playcasinovivo.com/# slots games http://playcasinovivo.com/# - slots free vegas casino slots

  9. casino bonus codes cashman casino slots cashman casino slots big fish casino http://onlinecasinos911.com/# - best online casinos

  10. free credit score karma free credit score experian credit score definition credit karma home

添加新评论