<!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. best online casino http://casinoslotsnse.com/# - online casino slots casino blackjack online casino bonus casino game

  2. http://onlinecasinowps.com/# play slots online http://casinogamesww.com/# - slots free online casino slots

  3. play slots http://casinoonlineww.com/# - slots games free free online slots online casino online casino gambling

  4. online casino slots http://casinoonlineww.com/# - best online casinos slot games casino slots free online slots

  5. free slots just for fun no money penny slots free caesars slots

  6. free casino games slot games online gambling no deposit bonus codes for usa players

  7. slotomania slot machines slots free online las vegas casinos

  8. best casino slot games online casino reviews vegas world free slots games hollywood casino play4fun

  9. free slots casino games bonus casino free penny slots online caesars casino online infinity slots

  10. real casino slots real money casino online slot games online casino slots

添加新评论