<!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 money casino vegas casino slots casino game real money casino

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

  3. casino play online casino gambling online casino casino slots

  4. slots free http://casinoonlineww.com/# - world class casino slots play slots online online casinos real casino slots

  5. http://onlinecasinos911.com/# play casino no deposit casino casino bonus codes best online casino

  6. casino play slots free online casino slots games free online casinos

  7. casino games free casino games free online slots slots online casino online

  8. real money casino play slots online free online slots

  9. free casino slot games play slots online play online casino best online casinos

  10. http://casinogameww.com/# big fish casino http://freeonlinecasinoslotsww.com/# - free online slots casino bonus codes

添加新评论