loop through selected checkbox

loop through selected checkbox

Hi

how i can loop through only selected checkbox and perform some operation,  out of all checkbox and if no one is selected alert message as ('select at least one)

thanks