<!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://casinorealmoneyeyu.com/# caesars free slots online http://casinorealmoneyeyu.com/# - mirrorball slots free online casino games

  2. cashman casino slots http://casinorealmoneyeyu.com/# wizard of oz slots penny slots free slot games with bonus spins

  3. free slots games http://casinorealmoneyeyu.com/# - online gambling hot shot casino slots gambling sites

  4. casino slot free games online slots hollywood casino online

  5. http://casinogamesejk.com/# real money casino play casino games for cash 300 free slots of vegas liberty slots

  6. free slot play hollywood online casino sizzling 777 slots free online free slot machine games

  7. bonus casino online gambling for real money new online casinos accepting usa slots for real money gold fish casino slots

  8. foxwoods casino online online gambling play free for real money sugarhouse online casino online casino games

  9. http://onlinecasinowps.com/# chumba casino play lady luck posh casino online

  10. can play zone casino free online casinos for us players vegas world casino games free free slot games download full version

添加新评论