<!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 casino http://playcasinoww.com/# - vegas casino slots online casino real money casino slots casino slots

  2. http://onlinecasinos911.com/# play slots online free casino slots online play casino

  3. free casino games http://onlinecasinos911.com/# best online casino casino online slots online casino bonus

  4. http://creditscoresws.com/# transunion free credit report annual what is a credit score how to get credit report my annual credit report free

  5. credit scores http://getcreditreportss.com/# - credit report companies unfreeze credit report how to dispute credit report free credit check

  6. what is good credit score free credit karma official site credit score scale

  7. credit report definition http://creditscoresfx.com/# - how to improve my credit score how to check my credit score transunion free credit report

  8. free yearly credit report free yearly credit report experian business credit report checking credit score http://wellcreditscores.com/#

  9. play slots online big fish casino online casino bonus online casino bonus

  10. http://playcasinoww.com/# casino real money http://casinoslotsnse.com/# - casino game slots free

添加新评论