Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How to find the lengtth of array checkbox checked using javascript

var inputTags = document.getElementsByTagName(‘input’);
var checkboxCount = 0;
length = inputTags.length;

for (var i=0;  i<length; i++) {
if (inputTags[i].type == ‘checkbox’ &&  inputTags[i].checked) {
checkboxCount++;
}
}

if(checkboxCount<=0){
alert(‘Some messageg’);

return false;
}



This post first appeared on PHP Fresher, please read the originial post: here

Share the post

How to find the lengtth of array checkbox checked using javascript

×

Subscribe to Php Fresher

Get updates delivered right to your inbox!

Thank you for your subscription

×