jquery - How do i check for a specific value in a field using javascript? -
the javascript checks form values not being empty
if(!$('nradulti').value){ok=2;} if(!$('transport').value){ok=2;} if(!$('plata').value){ok=2;} if(ok==1){return true;} else if(ok==2){ $('mesaj').innerhtml=" <span class='notarea'>please complete fields.</span>"; return false; }
i need add new variable called spam
captcha , check equal number, e.g. "what's 2+2" , script proceed if number 4
what line need add please?
thanks!
you can accomplish basic equality check. i'm not sure framework using, given other calls.
if(!$('spam').value == '4'){ ok=2; }
Comments
Post a Comment