phorcon3 Posted August 12, 2008 Share Posted August 12, 2008 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.