<!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. online betting sites buffalo slots zone online casino bingo games

  2. lady luck online casino http://casinorealmoneyeyu.com/# - real money casinos free penny slots igt free slots play free blackjack against computer

  3. real money casino play slots online las vegas casinos

  4. caesars casino online casino real money casino play cashman casino slots free

  5. http://casinoslotsnse.com/# penny slots free online online slot machines slots for real money free no deposit best free slots no download

  6. usa online casino http://casinogamesejk.com/# my vegas slots slots of vegas casino pop slots

  7. http://casinogamesejk.com/# free slot play free slots machines slots for free play slots

  8. list of las vegas casinos http://casinorealmoneyeyu.com/# - totally free slots no download free slots no download casino bonus bovada casino

  9. http://casinorealmoneyiw.com/# real money casino free slot games for fun 888 casino download

  10. 100 best usa casinos with best codes free online slots vegas world hollywood casino free slot play

添加新评论