Jquery gets the value of instance code for a set of checkboxes

  • 2020-03-26 21:45:03
  • OfStack

As follows:

$("#btn5").click(function()
  {
    var str="";
    $("[name='checkbox'][checked]").each(function() ' To get an array 
{
    str+=$(this).val()+",";    ' To iterate over groups 
    //alert($(this).val());
    })

Related articles: