<!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. play free slot machines with bonus spins play free for real money online casino real money free slot play

  2. play online casino best online casino casino real money

  3. no deposit casino http://casinogamesmn.com/# - online casinos free casino games online online casino

  4. casino play casino games world class casino slots slots games free http://casinogamesmn.com/# - real money casino

  5. slots games online casino slots cashman casino slots slots free

  6. casino bonus codes slots games world class casino slots best online casino

  7. infinity slots slotomania on facebook vegas world free slots

  8. play casino http://casinoslotsmnt.com/# casino online slots casino near me royal river casino

  9. online gambling for real money http://playslotsndx.com/# online casino slots no download win free money no deposit free slot machine games

  10. http://casinorealmoneydwq.com/# 300 free slots no download no registration play slots fortune bay casino casino bonus

添加新评论