I have a html-form with checkboxes.
It is required that has been checked by at least one any checkbox.
How do I use JavaScript to get the values of all checkboxes, and if there is not one checked among checkboxes then show alert with message?
I have a html-form with checkboxes. It is required that has been checked by
Share
Since you have tagged this post with
jqueryhere is a jQuery option.This function selects all the checkboxes on the page, narrows it down to only the checked ones, then get’s the size of the jQuery object.
Hope that helps. 🙂