Jump to content

[SOLVED] email domain validation..


phorcon3

Recommended Posts

html:

<input type="text" name="email" onkeyup="check_email(this.value);" size="30" />

 

js:

function check_email(value)
{
var list=new Array();
list[0]="yahoo";
list[1]="hotmail";
list[2]="gmail"; 

var count;

for(count=0;count<list.length;count++)
{
//and here i wanna check if the email contains either one of those domains listed above
if(this is that)
{
document.getElementById('status').innerHTML='worked';//ie: [email protected]
}
else
{
document.getElementById('status').innerHTML='error';//ie: [email protected]
}
}
}

 

any ideas how to do this?

Link to comment
https://forums.phpfreaks.com/topic/119312-solved-email-domain-validation/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.