<!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. http://onlinecasinogamesww.com/# free casino slot games http://casinorealmoneyeyu.com/# - online casino slots big fish casino

  2. play slots online http://casinobonuscodesww.com/# free slots games online casinos casino real money

  3. http://casinogamesejk.com/# play casino free slots games online casino slots free online slots

  4. http://onlinecasinoslotsui.com/# casino bonus codes caesar casino online slot games virgin online casino

  5. free slots games online online casinos real money penny slots free online free vegas slots

  6. http://casinorealmoneyiw.com/# online casino games http://casinogamesejk.com/# - casino bonus codes play slots online

  7. play slots online casino online free casino slot games free casino slot games

  8. vegas free slots online old version vegas world rock n cash casino slots play free mr cashman slots

  9. cleopatra slots http://onlinecasinos911.com/# slotomania free online slots game real money casino wizard of oz slots

  10. my vegas slots lady luck casino free games free slots no registration no download liberty slots casino

添加新评论