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: nickname@yahoo.com } else { document.getElementById('status').innerHTML='error';//ie: nickname@mail.com } } } any ideas how to do this? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.