below is the html code i would like to get the values of checkboxes seperated with comma in the textbox of id='selchk' and get the count of checkbox clicked in textbox of id='getcnt' and on uncheck the value should be removed and count should be reduced using jquery.i have tried but didn't achieve the result.need help
<input type='checkbox' class='chk' value='1'>        
<input type='checkbox' class='chk' value='2'>       
<input type='checkbox' class='chk' value='3'>        
<input type='checkbox' class='chk' value='4'>        
<input type='checkbox' class='chk' value='5'>        
<input type='checkbox' class='chk' value='6'>           
<input type='text' class='getcnt' id='getcnt'>        
<input type='text' class='selchk' id='selchk'>
 
     
     
    