<!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. no deposit casino casino online slots free slots play slots online http://casinobonuscodesww.com/# - casino game

  2. http://casinogamesejk.com/# vegas world casino games free free slot games no download no registration las vegas free slots real vegas casino games free

  3. http://casinogamesejk.com/# list of las vegas casinos all free slots free casino games no download free casino games with bonus

  4. real casino slots http://casinorealmoneyiw.com/# download free casino slot games online casino bonus sugarhouse online casino

  5. foxwoods casino online download free casino games wizard of oz slots casino slots free games http://casinorealmoneyeyu.com/# - hollywood slots

  6. totally free casino games casino slot free casino games online

  7. free slots casino games liberty slots casino free vegas slot games free slots machines

  8. vegas world free games online las vegas free penny slots hollywood casino free slots can play zone casino free

  9. http://casinorealmoneyeyu.com/# best online casinos http://casinorealmoneyeyu.com/# - free games online no download all free casino slots

  10. penny slots free online online casino slots free vegas slots win free money no deposit

添加新评论