i have this check box with different name but all the name start with checkUser
<input type="checkbox" value="60176694447" name="checkUser52106">
<input type="checkbox" value="60176694448" name="checkUser52107">
<input type="checkbox" value="60176694449" name="checkUser52108">
A quick google bring me this function from sitepoint
$(function(){
$('#btnClick').click(function(){
var val = [];
$(':checkbox:checked').each(function(i){
val[i] = $(this).val();
});
});
});
Right now i want to get all the value of selected checkbox with name start with checkUser. How to achieve this?