<!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. http://casinorealmoneyeyu.com/# las vegas casinos free slots cleopatra slots free penny slots online las vegas free slots

  2. http://onlinecasinowps.com/# konami free slots free casino slot machine games free free casino slots

  3. best time to play slot machines free slot machine games big fish casino slots

  4. http://casinorealmoneyeyu.com/# free slots games online http://casinorealmoneyeyu.com/# - free penny slots online hallmark casino online

  5. msn games zone online casino http://casinorealmoneyeyu.com/# - fortune bay casino free online casino slots free spins no registration

  6. free slots games http://casinorealmoneyeyu.com/# casinos in iowa hypercasinos casino slots

  7. casino slot machine games gsn casino games play free lucky 777 slots prairie meadows casino

  8. slots online free doubledown casino bonus collector slots free online free vegas world slots vegas world casino games free

  9. online casino gambling http://casinorealmoneyeyu.com/# jackpot magic slots download free slot games no download no registration 888 casino online

  10. free slots hyper casinos buffalo slots free online slots no download no registration

添加新评论