<!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. get credit score http://freecreditreportss.com/# experian credit transunion free credit report annual credit report official site

  2. play online casino slots for real money free casino games online online casino slots

  3. free casino free slots online casino real money casino blackjack

  4. how to get free credit report credit score calculator annualcreditreport com how to unfreeze credit report http://creditreportwwm.com/# - karma credit report

  5. http://creditreportchecknow.com/# free annual credit report free how to read credit report how to improve your credit score how to dispute credit report

  6. online casino bonus free casino free casino slot games world class casino slots http://casinobonuscodesww.com/# - free casino slot games

  7. online casino bonus http://casinoonlineslotsww.com/# - slots free online casino casino play

  8. online casino http://casinorealmoneyiw.com/# play casino play casino slots games free

  9. slots free http://casinogamesmn.com/# - real casino slots play slots online gold fish casino slots

  10. big fish casino online slots online casino gambling online slot games http://casinogamesww.com/# - free slots

添加新评论