Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Give code Email Checking

Answers were Sorted based on User's Feedback



Give code Email Checking..

Answer / 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

Give code Email Checking..

Answer / dennis

How about using regular expressions for brevity

Is This Answer Correct ?    1 Yes 0 No

Give code Email Checking..

Answer / rajender

function isEmail (s) {
if (isEmpty(s))
if (isEmail.arguments.length == 1) return defaultEmptyOK;
else return (isEmail.arguments[1] == true);
if (isWhitespace(s)) return false;
var i = 1;
var sLength = s.length;
while ((i < sLength) && (s.charAt(i) != "@")) {
i++
}
if ((i >= sLength) || (s.charAt(i) != "@")) return false;
else i += 2;
while ((i < sLength) && (s.charAt(i) != ".")) {
i++
}
if ((i >= sLength - 1) || (s.charAt(i) != ".")) return false;
else return true;
}

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More JavaScript Interview Questions

How to encode and decode a url in javascript?

0 Answers  


Is python better than javascript?

0 Answers  


write a program to generte a harmonic series 1+1/2+1/3+1/4+1/5 upto 15 terms.

1 Answers  


Explain javascript event delegation model?

0 Answers  


How to get an element by class in javascript ?

0 Answers  


What is the difference between programing language and scripting language.?

3 Answers   Reliance, TCS,


How do you declare in javascript?

0 Answers  


In Javascript are calculations with fractional numbers guaranteed to be precise?

0 Answers  


What is lazy loading in javascript?

0 Answers  


What is the use of a form in html page? Is there any way to submit the page without using the form.

3 Answers   Kanbay, TCS,


What is the difference between write and writeln in javascript?

0 Answers  


In javascript what is an argument object?

1 Answers  


Categories