<!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 slots vegas casino slots free casino slot games gold fish casino slots casino bonus codes

  2. slots games free vegas casino slots play online casino vegas casino slots online casino bonus

  3. http://onlinecasinowps.com/# real casino slots http://casinogamesejk.com/# - slots free real money casino

  4. free casino http://casinoslotsnse.com/# online casinos slots games free online casinos

  5. http://casinogameww.com/# online slot games http://casinoslotsnse.com/# - free casino games casino real money

  6. casino online online casino games slots online big fish casino http://onlinecasinowps.com/# - play casino

  7. my annual credit report dispute credit report my credit score free what is credit score http://wwcreditreport.com/# - annual credit report

  8. free credit report annual http://wellcreditscores.com/# how to increase your credit score fast my free annual credit report com best credit score

  9. http://creditscoresfx.com/# get a free credit report http://creditreportchecknow.com/# - credit score chart experian credit report free

  10. real casino slots slot games casino games

添加新评论