<!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. liberty slots best free slots vegas world free slots no download 50 lions free slots mohegan sun free online slots

  2. gsn casino games real casino slots play free mr cashman slots online gambling sites

  3. play lady luck bovada casino caesars slots free casino slots free games

  4. http://casinorealmoneyeyu.com/# free casino games no registration no download http://casinorealmoneyeyu.com/# - all free casino slot games penny slots free online

  5. 100 no deposit bonus codes jackpot magic slots download list of online casinos for us players

  6. http://casinorealmoneyeyu.com/# jackpot party casino slots free casino slots with bonuses usa casinos no deposit free welcome bonus mirrorball slots

  7. slots online play slots online for money slots online free free online bingo vegas world play free casino slots now

  8. lady luck casino vicksburg jack online casino 300 free slots of vegas slot machines for home entertainment

  9. free slots games online hollywood casino free slots gold fish casino slots no deposit win real cash hollywood casino free slots online

  10. online casino bonus http://casinorealmoneyeyu.com/# - online slots real money buffalo slots hollywood slots

添加新评论