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

What is nodetype in javascript?

0 Answers  


What is an empty html tag?

0 Answers  


What javascript method would convert the string “20” to an integer (on the fly) so “20” + 20 = 40?

0 Answers  


hello sir my name is naga sekhar i completed my b-tech in 2011 with 61% in IT streme.I completed my core and advanced java coure before 8months back.Still i did not get the job.i tried so many times.and i went to some interviews but no use.now i want to get the job in software sector

0 Answers  


What is closure? Give an example.

0 Answers  


How do you assign object properties?

3 Answers   Satyam,


What does e mean in javascript?

0 Answers  


Does javascript have the concept level scope?

0 Answers  


Hai what is the difference between java and javascript

2 Answers  


What is the similarity between the 1st and 2nd statement?

0 Answers  


Is there automatic type conversion in JavaScript?

0 Answers  


Advantages & Disadvavtages of Java Script? Advantages & Disadvantages of CGI Scripting? Structure of Java Script? Commands of Java Script? HTML Basic Reviews?

3 Answers  


Categories