Checkboxlist Control Validations using Javascript

Posted On // Leave a Comment
var CHK = document.getElementById('<%=chkInterest.ClientID %>');
var checkbox = CHK.getElementsByTagName("input");
var counter=0;
for(var i=0;i<checkbox.length;i++)
    {
        if(checkbox[i].checked)
            counter++;
    }
alert(counter);

0 komentar: