<!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 casino slots gold fish casino slots slots for real money slots games free

  2. foxwoods online casino free penny slots no download casinos in iowa newest usa online casinos

  3. pch slots tournament best online casino poker games high 5 casino

  4. slots of vegas casino http://playcasinostm.com/# vegas casino slots play blackjack for free free casino games online

  5. http://playcasinostm.com/# dakota sioux casino slots lounge freeslots.com slots

  6. gsn casino slots online casinos for us players heart of vegas casino game slots games vegas world best place to gamble in vegas

  7. http://casinoslotsbcx.com/# free casino slots with bonuses free vegas world slots free casino blackjack casino games

  8. http://playcasinoslotsdds.com/# hollywood casino free slots free slots games empire city casino online free slot machines

  9. sugarhouse casino online slots free spins no registration real money casino doubledown casino bonus collector goldfish slots

  10. play slots play slots casino games casino game

添加新评论