سلام
دوستان این رو بررسی کنید لطفا:
//in the name of GOD
// this 4 vars below are will use for RegExps in switch statement at several lines later \/\/\/
var gmail = new RegExp(gmail.com$);
var yahoo = new RegExp(yahoo.com$);
var outlook = new RegExp(outlook.com$);
var hotmail = new RegExp(hotmail.com$);
//and this one below for asking email\/\/\/
var AskingTheEmail = prompt("email?");
switch (AskingTheEmail){
case test.gmail :
alert("a gmail");
break;
case test.yahoo :
alert ("a yahoo");
break;
case test.outlook :
alert ("an outlook");
break;
case test.hotmail :
alert ("a hotmail");
break;
}
پاسخ ها