简体   繁体   English

jQuery注册表格,如果声明不起作用则发送电子邮件

[英]jquery registration form, email if statement not working

I am making a registration form using jquery to dynamically update each field as the user enters information, for some reason when I go to compare emails the if statement does not run. 我正在使用jquery制作一个注册表单,以在用户输入信息时动态更新每个字段,出于某种原因,当我去比较电子邮件时,if语句不会运行。 any help would be most appreciated. 非常感激任何的帮助。

have a look at this link which shows proper email validation in php . 看一下这个链接,该链接显示了php中正确的电子邮件验证 Also then if the mail is valid apply the check if it is already taken or not. 另外,如果邮件有效,则应用检查是否已被接受。 I wrote to check if emails exist after because Database query are costly and better not to have query for all bogus data also. 我写信是为了检查之后是否存在电子邮件,因为数据库查询的成本很高,最好不要同时查询所有虚假数据。

Hope this helps you out 希望这可以帮助你

also change 也改变

<input type = text id = email>

to

<input type = email id = email>

which is supported in html5 html5支持

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM