I want to verify an Input of type Email, and get a validation once placed the .COM since it is the only thing that lacks the validation of the browser.
I was dealing with JQuery but I can not find information to help me, I need something that works equal to IndexOf
of JavaScript but in Jquery, or failing that, how can I use an attribute or JavaScript function in Jquery? / p>
I remember that [0]
was used to specify a JavaScript in JQuery but I do not remember its correct use.
Using something like this to validate the .com
:
else if (this.value.indexOf(".com") <= 0) {
alert("El email debe contener .com")};