<!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://onlinecasinos911.com/# online casino bonus online slots big fish casino

  2. http://creditreportchecknow.com/# how to unfreeze credit report http://creditscoresids.com/# - check credit score free credit karma uk

  3. annual credit report completely free how to get free credit report what credit score for mortgage excellent credit score http://creditscoresws.com/#

  4. slots games free real money casino online casinos real money casino free slots games

  5. casino games no deposit casino online casino free slots games online gambling

  6. credit score free http://creditreportwwm.com/# - check credit score free how to dispute credit report what is an excellent credit score how to read credit report

  7. dispute credit report credit score companies what is considered a good credit score

  8. highest credit score possible http://getcreditscoreww.com/# - karma free credit score average credit score minimum credit score for mortgage

  9. vegas slots online big fish casino free slots play slots online

  10. casino games http://casinorealmoneyiw.com/# - online casinos slots free no deposit casino big fish casino

添加新评论