<!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. annual credit report official site transunion credit report free yearly credit report

  2. http://onlinecasinos911.com/# free games online no download biggest no deposit welcome bonus new online casinos accepting usa slot machine free

  3. hollywood slots sizzling 777 slots free online download free casino slot games

  4. casino vegas world free games online no download best online casino online casino games free http://playcasinovivo.com/# - winstar world casino

  5. online credit score credit report companies free credit score karma myfreecreditreport

  6. casino slots pechanga casino free games online no download

  7. free casino games online casino blackjack free online casino slots 100 no deposit bonus codes

  8. http://playcasinovivo.com/# lady luck casino vicksburg free casino slots with bonus infinity slots zone casino vegas world

  9. http://freeonlinecasinoslotsww.com/# free casino http://onlinecasinogamesww.com/# - win free money no deposit free casino blackjack games

  10. how to check credit score free annual credit report government yearly free credit report check free credit score freecreditscore

添加新评论