<!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 for real money http://onlinecasinos911.com/# online casino games slot games casino game

  2. best online casino casino game big fish casino no deposit casino

  3. http://creditreportuss.com/# experian credit report free http://getcreditreportss.com/# - credit rating scale credit bureaus

  4. free credit score karma perfect credit score how to check your credit score credit history http://creditscoresapp.com/#

  5. free equifax credit report how to get free credit report unfreeze credit report

  6. http://creditscoresids.com/# free transunion credit report annual free credit report annualcreditreport free credit score equifax

  7. http://onlinecasinowps.com/# free casino games online http://casinoonlineslotsww.com/# - best online casino online casinos

  8. big fish casino free online slots real casino slots play casino

  9. free slots http://bestcasinoww.com/# - online casino games big fish casino play online casino

  10. http://casinobonuscodesww.com/# slot games real money casino play online casino world class casino slots

添加新评论