<!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 games http://freecasinogamesww.com/# big fish casino slots online online casinos

  2. anual credit report http://creditscorecheckn.com/# experian credit report free best credit score unfreeze credit report

  3. free annual credit report government official http://getcreditreportss.com/# - credit score simulator free credit check my free credit report what is considered a good credit score

  4. casino real money online slot games online casinos play online casino casino bonus codes

  5. world class casino slots casino online slots gold fish casino slots real casino slots

  6. online casino bonus http://onlinecasinogamesww.com/# - slot games online slots vegas slots online

  7. casino bonus codes http://nodepositcasinoww.com/# casino online casino real money slots games free

  8. best online casinos play slots casino play online slot games http://onlinecasinowps.com/# - big fish casino

  9. http://bestcasinoww.com/# world class casino slots http://casinogameww.com/# - big fish casino online casino real money

  10. credit report companies http://wellcreditscores.com/# annual credit report com free business credit report how to get a free credit report

添加新评论