<!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. cashman casino slots http://bestcasinoww.com/# cashman casino slots online casino bonus online slot games

  2. http://casinoonlineslotsww.com/# slots games free casino slots free casino slot games casino game

  3. casino online casino online online slot games

  4. free casino slot games http://casinobonuscodesww.com/# casino online slots gold fish casino slots play slots online

  5. 50 lions free slots http://playcasinovivo.com/# vegas world casino games free free slots slotomania free casino games slot machines

  6. http://playcasinoslotsdds.com/# free vegas world slots casino slot free slots games vegas world

  7. hollywood online casino show all free slots games absolutely free slots 200 free slot casino games

  8. slot games with bonus spins zone online casino msn games zone online casino

  9. slots games hot shot casino slots online casinos for us players all free casino slot games

  10. http://casinogamesww.com/# online casino games http://bestcasinoww.com/# - online gambling slots for real money

添加新评论