Thursday, December 1, 2011

Get checked check box value in jquery

IF you have only one check box group in the form

$('input:checkbox:checked').each(function(i){
    alert($(this).val());
});


If you have many check box group you have to mention the group name

$('input:checkbox[name=checkboxname]:checked').each(function(i){
    alert($(this).val());
});

No comments:

Post a Comment