<!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. good credit score range karma free credit score check credit score

  2. casino slots http://onlinecasinogsw.com/# free online slots slots games free free casino games

  3. play casino http://onlinecasinos911.com/# real casino slots play slots online free casino

  4. how to check my credit score my credit score free how to raise credit score equifax credit score credit score ratings

  5. turbotax credit score average credit score credit karma check my credit score credit karma credit score free max credit score

  6. casino blackjack http://onlinecasinogsw.com/# - casino real money online casino real casino slots slots for real money

  7. world class casino slots best online casino free casino

  8. online slots online casino gambling online gambling

  9. fico credit score http://freecreditreporthh.com/# fico credit score how to check credit score discover credit score

  10. credit score calculator how to improve credit score free credit score equifax credit sesame

添加新评论