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

  2. http://wwcreditreport.com/# what is credit score http://1creditscores.com/# - my free annual credit report com annual credit report official site

  3. check credit score for free http://creditreportwwm.com/# - credit bureau reports free credit score karma how to check my credit score

  4. free annual credit report com http://getcreditreportss.com/# - transunion credit report free experian credit report annual credit report official site credit score check

  5. credit karma tax filing credit score chart my free annual credit report annual credit score http://creditscoresfx.com/# - check your credit report

  6. best online casino casino game play casino free slots games

  7. online casino games online casino games play slots online big fish casino online slot games

  8. play online casino cashman casino slots cashman casino slots slots free

  9. http://creditscoresws.com/# what is my credit score credit bureau reports annualcreditreport what is a great credit score

  10. big fish casino http://casinogamesmn.com/# - casino blackjack online casino real money online casino play slots online

添加新评论