Is there no Javascript LIKE statement?

Posted by Etienne on Stack Overflow See other posts from Stack Overflow or by Etienne
Published on 2010-05-11T08:37:12Z Indexed on 2010/05/11 8:44 UTC
Read the original article Hit count: 403

Filed under:
|
|

I want to do this but dont know how to do it in JavaScript.

if (Email == "*aol.com" || Email == "*hotmail*" || Email == "*gmail*" || Email == "*yahoo*") 
    {
     alert("No Hotmail, Gmail, Yahoo or AOL emails are allowed!");  
     return false;
    }

Any way around this?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about html