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

  2. how to raise your credit score fast http://creditscoresapp.com/# - my credit score free whats a good credit score national credit report free annual credit report free

  3. http://casinogamesejk.com/# free casino slot games http://freeonlinecasinoslotsww.com/# - casino bonus codes real money casino

  4. http://creditreportuss.com/# free annual credit report free experian credit get credit report what is a great credit score

  5. whats my credit score http://creditscoresids.com/# - my credit score how to raise your credit score fast free credit score equifax

  6. casino real money casino games online casino games slots for real money

  7. play slots online http://onlinecasinos911.com/# slot games free casino games online world class casino slots

  8. real casino slots online slot games casino bonus codes online casino bonus http://casinobonuscodesww.com/# - online casino gambling

  9. casino bonus codes http://casinoonlineww.com/# free slots games online casino bonus online casino real money

  10. play online casino http://onlinecasinowps.com/# - best online casino free slots real money casino free online slots

添加新评论