<!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. zone casino vegas world play casino games for free free casino games no download online casino

  2. http://casinoslotsbcx.com/# tropicana online casino free slot play no download casino games no download no registration free slots online no download

  3. free slot games free online bingo vegas world no deposit win real cash 200 free slot games

  4. http://freecasinogamesww.com/# online casino slots http://casinoonlineslotsww.com/# - casino real money free casino games online

  5. casino games free slots free online games that pay real money no download no registration slots

  6. http://casinoslotsmnt.com/# doubledown casino scatter slots casino online slots free full casino games download

  7. http://casinorealmoneyiw.com/# online gambling real casino slots free casino games play casino

  8. http://casinogamesejk.com/# online slot games http://casinogamesmn.com/# - slots games free slots games free

  9. casino slots http://casinogamesmn.com/# - slot games online casino bonus slot games

  10. real casino games slots free vegas casino slots free slot games casino games free slots hallmark casino online

添加新评论