<!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 games free http://casinorealmoneyiw.com/# - slot games casino blackjack slot games

  2. http://creditreportgetnow.com/# whats a good credit score annual free credit report turbotax credit score how to increase your credit score fast

  3. real casino slots slots free slots for real money free slots games

  4. casino bonus codes vegas slots online casino game

  5. http://creditscoresapp.com/# turbo credit score http://creditreportgetfast.com/# - credit score free free credit report transunion

  6. http://creditscoresfx.com/# credit score range my free credit report annual my credit score karma free credit score

  7. free credit report annual http://1creditscoreresults.com/# - dispute credit report how to increase your credit score fast credit sesame

  8. free credit report online annual credit report completely free experian checking credit score my free credit report http://getcreditscoreww.com/# - free annual credit report

  9. vegas casino slots free casino casino slots

  10. play slots best online casino casino game slots games slots online

添加新评论