<!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. perfect credit score credit score ratings free credit score experian

  2. http://onlinecasinos911.com/# cashman casino slots http://onlinecasinos911.com/# - best online casinos casino games

  3. my credit score free http://creditscorechecknw.com/# free credit score equifax good credit score range credit scores

  4. http://playcasinovivo.com/# big fish casino http://onlinecasinogsw.com/# - real casino slots best online casino

  5. online casino slots http://playcasinovivo.com/# online casino slots online casino best online casino

  6. free online slots world class casino slots casino online slots

  7. free credit score check free credit score fico credit score credit score needed for mortgage free credit karma

  8. http://creditscorests.com/# how to check my credit score experian free credit score credit karma check my credit score

  9. boost credit score karma credit score check credit score free credit karma credit score free how to check credit score

  10. http://freecreditreportww.com/# check your credit score free credit score experian credit karma com free credit score

添加新评论