<!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. download free casino slot games http://onlinecasinoslotsui.com/# free casino games online slots free online 200 no deposit bonus usa

  2. http://casinoonlinewwa.com/# las vegas casinos usa casinos no deposit free welcome bonus caesar casino free slots games slotomania on facebook

  3. slots games vegas world vegas casino games goldfish casino slots free house of fun free slots free slot games online

  4. play slots online http://casinoonlineslotsww.com/# - real casino slots no deposit casino real casino slots

  5. http://casinoslotsww.com/# casino bonus codes http://casinobonuscodesww.com/# - casino game casino play

  6. free slots games http://bestcasinoww.com/# slots games real money casino real money casino

  7. casino games free casino online casino bonus play casino

  8. http://casinoslotsbcx.com/# pala casino online casinos online free slots no registration hot shot casino slots

  9. paradise casino online gambling hollywood casino online slots casino vegas world msn games zone online casino

  10. cleopatra slots http://casinogamesmv.com/# pch slots vegas casino free slot games play slots for free win real money

添加新评论