<!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. http://creditscoresapp.com/# free credit report online credit score free credit scores dispute credit report

  2. empire city online casino best time to play slot machines best free slots no download vegas free slots online

  3. lady luck casino free games slots of vegas casino online slots real money free games for casino slots hollywood

  4. vegas world free games online slots http://casinoonlineslotsww.com/# - hollywood casino big fish casino download free free slots online no download no registration no download no registration slots

  5. play slots online for money http://onlinecasinogsw.com/# - cashman casino slots free casino vegas world casino online

  6. best place to gamble in vegas http://onlinecasinos911.com/# vegas slots casino play free lucky 777 slots slots online free

  7. free slots vegas cleopatra slots free casino games for fun

  8. free credit score check your credit report online credit report for free free credit check how to get a free credit report equifax free credit report

  9. free credit score check online credit report http://creditscoresws.com/# credit karma com free credit score get free credit report credit report scores

  10. new no deposit casinos accepting us players http://freeonlinecasinoslotsww.com/# - 200 free slot casino games vegas casino free slot games gsn casino

添加新评论