JSI is judged whether the string is a legitimate EMAIL format

xiaoxiao2021-03-06  44

/ ** * Break whether the string EmailAddr is a legitimate Email format * mainly determines '@' and '.' Whether it appears, and the position of the two * @Param Emailaddr entered Email Address * @return True / false. * / Function emailcheck (emailddr) {IF ((emailddr == null) || (EmailAddr.Length <2) Return False;

// Need '@' and is not in the first character. Var apos = emailddr.indexof ("@", 1);

IF (APOS <0) {Return False;}

// '@' appears '.', And does not follow it. IF (emailddr.indexof (".", Apos 2) <0) {Return False;}

Return True;}

Ayuan

9CBS certified blog expert

Blog expert

Huawei old employees

Big Data

More than ten years, in Huawei, Internet Corporation's experience, profound understanding and practical experience in CRM, big data, mainly sharing various project experience, including architecture, Java, big data and other articles

转载请注明原文地址:https://www.9cbs.com/read-47566.html

New Post(0)