<!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://casinogameww.com/# world class casino slots online casino real money play online casino online slots

  2. hollywood casino free online games free full casino games download casino blackjack empire city casino online

  3. free slots games online no deposit casino free casino best free slots vegas world free slots machines

  4. high five casino slots real casino slots 100 best usa casinos with best codes casino games free slots

  5. maryland live casino online online casino free slot machines free online casino games vegas slots free

  6. http://playcasinostm.com/# play free vegas casino games vegas world free slots games free slots just for fun no money

  7. casino free hyper casinos free penny slot machine games las vegas free penny slots online gambling sites

  8. free slot play no download list of online casinos for us players high 5 casino hot shot casino slots 300 free slots of vegas

  9. real casino slots best online casinos casino online slots play slots

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

添加新评论