<!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. vegas world free games http://casinoonlineslotsww.com/# - online casino slots no download las vegas casinos free slots free slots hollywood online casino no deposit free welcome bonus

  2. max credit score my free credit report annual truly free credit report

  3. play slots for real money united states http://onlinecasinos911.com/# - pch slots best online casinos igt free slots

  4. http://onlinecasinogamesww.com/# no deposit bonus codes for usa players http://freeonlinecasinoslotsww.com/# - vegas free slots lady luck casino vicksburg

  5. new online casinos free online slots no download poker games vegas casino slots

  6. free video slots http://freeonlinecasinoslotsww.com/# vegas casino online free casino games slots free online slots

  7. http://casinogamesww.com/# msn games zone online casino play free slots free slot games for fun free 777 slots no download

  8. free casino games slotomania gsn casino games slotomania free online slots game royal river casino

  9. http://creditscoresapp.com/# free experian credit report how to get free credit report how to get credit report

  10. http://playcasinovivo.com/# bonus casino free casino games for fun free vegas slots online buffalo slots

添加新评论