<!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. real money casino free casino games world class casino slots

  2. http://onlinecasinos911.com/# slots free free slots games free casino slot games

  3. slot games slots online free online slots free slots games

  4. free casino best online casino casino slots

  5. http://casinorealmoneyeyu.com/# free slots casino online slots real casino slots best online casino

  6. http://casinoslotsnse.com/# gold fish casino slots http://onlinecasinowps.com/# - play online casino casino slots

  7. free slots free casino online slots online slots

  8. real money casino big fish casino online slot games casino bonus codes online casino real money

  9. how to dispute credit report annual credit report free credit karma tax filing what is a credit score

  10. http://creditreportuss.com/# experian business credit report http://creditscoresws.com/# - what credit score for mortgage turbo credit score

添加新评论