<!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. casino bonus codes http://playcasinovivo.com/# vegas slots online online gambling slots games free

  2. online slot games http://playcasinovivo.com/# online casino games free casino games casino bonus codes

  3. http://onlinecasinos911.com/# casino play http://onlinecasinogsw.com/# - casino bonus codes vegas slots online

  4. credit karma free credit score check my credit score highest credit score credit karma check my credit score how to improve your credit score

  5. karma credit score discover credit score check credit credit karma credit score free credit score experian

  6. good credit score range http://creditreportsww.com/# boost credit score free credit score experian credit score check

  7. free credit score experian credit score check credit scores perfect credit score credit karma free credit score

  8. how to raise credit score discover credit score credit score calculator

  9. slots free casino slots slots games free big fish casino http://onlinecasinos911.com/# - free casino games

  10. http://onlinecasinogsw.com/# big fish casino http://onlinecasinogsw.com/# - best online casinos slots for real money

添加新评论