<!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. free online slots http://casinoslotsnse.com/# - vegas slots online online slot games online casino

  2. http://casinoonlineslotsww.com/# best online casino free casino games free online slots casino play

  3. cashman casino slots free casino games play slots online real casino slots

  4. http://onlinecasinos911.com/# casino online slots casino online online slots

  5. online casino best online casinos free casino games

  6. http://onlinecasinos911.com/# big fish casino cashman casino slots slots for real money

  7. check credit report credit score scale check credit rating what is credit score http://freecreditreportss.com/# - how to improve my credit score

  8. credit karma canada http://creditreportchecknow.com/# - how to check credit score how to improve credit score free annual credit report government official

  9. http://onlinecasinos911.com/# best online casinos online casino games slots games online casino games

  10. casino play http://bestcasinoww.com/# - online slot games free slots online casino

添加新评论