Answer the question
In order to leave comments, you need to log in
How to get input this form?
I'm trying to select fields of the current form that have a certain class, but it doesn't work. Maybe someone knows how to do it right?
var form = this.form;
var inputs = this.form.elements.hasClass( "valid" );
Answer the question
In order to leave comments, you need to log in
hasClass returns true, false, not an object
var inputs = $(form).find("input.valid");
inputs.each(function(){
alert($(this).val());
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question