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

  2. http://onlinecasinos911.com/# online casino games online slots casino bonus codes

  3. vegas slots online real casino slots slots games slot games http://casinoslotsww.com/# - casino online slots

  4. online casino http://freecasinogamesww.com/# casino games play slots casino game

  5. online gambling online casino slots world class casino slots online casinos http://casinoslotsnse.com/# - casino online

  6. free slots http://casinogamesmn.com/# - online casino real money slot games casino game

  7. slots games http://casinogamesww.com/# - real casino slots play online casino vegas casino slots

  8. online slot games free online slots no deposit casino free slots games casino blackjack

  9. http://onlinecasinos911.com/# vegas casino slots free online slots free casino games online slots for real money

  10. free slots games online casinos play casino slots for real money real money casino

添加新评论