Find Length Multiple checkbox

Find Length Multiple checkbox

Below code is useful if you are trying to find length of checkbox checked. This will give you length check-box which is checked by the user:

var len = [].slice.call(document.querySelectorAll(“[name=’nameOfCheckbox’]”)).filter(function(e) { return e.checked; }).length;

Leave a Reply

Your email address will not be published. Required fields are marked *