how to get multiple checkbox value using jquery

前端 未结 12 742
终归单人心
终归单人心 2020-11-29 20:11

How can I get the value of checkboxes which are selected using jquery? My html code is as follows:



        
12条回答
  •  失恋的感觉
    2020-11-29 20:30

    Since u have the same class name against all check box, thus

       $(".ads_Checkbox") 
    

    will give u all the checkboxes, and then you can iterate them using each loop like

    $(".ads_Checkbox:checked").each(function(){
       alert($(this).val());
    });
    

提交回复
热议问题