<!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. goldfish slots no deposit casino free slots vegas cashman casino slots

  2. free casino games sun moon best free slots vegas world 100 most popular free slots google free casino slot games online gambling for real money

  3. http://casinorealmoneyeyu.com/# 888 casino download free casino games slot vegas free slots online play free for real money

  4. http://casinorealmoneyiw.com/# jackpot party casino slots casino game 200 no deposit bonus usa free penny slots with bonus spins

  5. house of fun free slots empire city online casino vegas world free games online slots play free for real money lady luck casino caruthersville

  6. http://casinoslotsnse.com/# penny slots sizzling 777 slots free online play free mr cashman slots

  7. best place to gamble in vegas http://casinorealmoneyeyu.com/# play slots for real money united states slots games vegas world free slots games online

  8. real money casinos online slots real money foxwoods online casino

  9. free online casino games free slots online no download no registration best casino slot games slots games vegas world

  10. play casino slots turning stone online slots free las vegas casino games 50 lions free slots free slot play

添加新评论