Give code Email Checking

Answer Posted / bharani kumar

var ree;
ree=/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
if(ree.test(document.formname.txt_email.value)==false){
alert("Enter valid email id");
document.formname.txt_email.value = "";
document.formname.txt_email.focus();
return false;
}

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the concept of “functions as objects” and how does this affect variable scope?

567


What is difference between promise and callback?

557


Explain the for-in loop?

606


What are undeclared and undefined variables?

630


What does 3 dots mean in javascript?

549






What is output of undefined * 2 in javascript?

564


What is innertext javascript?

544


Is javascript event driven?

553


What is dhtml in javascript?

567


What is a closure and how do you use it?

577


What does “1?+2+4 Evaluate to? What about 5 + 4 + “3??

635


What are events in javascript?

574


How do I open javascript on my iphone?

563


What is difference between local and global scope in javascript ?

608


How do you change the style/class on any element?

613