<!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 casino slots free http://casinorealmoneyeyu.com/# - virgin online casino online casino reviews high 5 casino

  2. free slot games http://casinorealmoneyeyu.com/# real casino slot machine games slots online free slots games online

  3. http://casinorealmoneyeyu.com/# free casino games sun moon casino games no download no registration free full casino games download usa online casino

  4. free games online slots free slot games download full version play free vegas casino games free casino slots no download

  5. old vegas slots free slots with bonus rounds no download free video slots

  6. http://onlinecasinowps.com/# play free lucky 777 slots free slot play no download all free casino slot games

  7. http://casinogamesejk.com/# slots games vegas world big fish casino slots bonus casino

  8. http://casinoslotsnse.com/# best time to play slot machines most popular free casino slots slots farm caesars slots

  9. gold fish casino slots jackpot party casino slots online slots best online gambling sites for real money

  10. casino games free slots igt free slots best casino slots online online gambling play free for real money

添加新评论