Answer the question
In order to leave comments, you need to log in
Can you explain what this line of code means?
The site has an ajax form, I need to put recaptcha3.
I understand that it seems that in this line there is a check for the completeness of the form fields, but I have a few questions:
return $(this).find('input[name="DATA[NAME]"]').val().length < 2 ? (alert("Введите имя"), !1) : 0 == IsEmail(t) ? (alert("Введите корректный email"), !1) : ($.ajax({...тут отправка формы
if (captcha.length)
?
Answer the question
In order to leave comments, you need to log in
Break code into if-else
if ($(this).find('input[name="DATA[NAME]"]').val().length < 2 ) {
return (alert("Введите имя"), !1)
} else if (0 == IsEmail(t)) {
return (alert("Введите корректный email"), !1)
} else {
return ($.ajax({...тут отправка формы})
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question