currently i have a form with dynamically generated select input.
Field name is an array in the form name="myfield[]"
and they have a common class, example: class="unknownfield"
How can i, using Javascript or jQuery validate that every select on the Form has a selected which is not the default empty?
Something to the extent of:
$("form select").each(function() {
if (this.value == "") //empty!
});
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.