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 are the data types available in javascript? Explain

0 Answers  


What does the isNaN() function?

0 Answers  


What do mean by NULL in Javascript?

0 Answers  


How are object properties assigned?

0 Answers  


TypeError: document.getelementbyid(...) is null?

0 Answers  


What are the distinct types of error name values?

0 Answers  


Can an anonymous function be assigned to a variable?

0 Answers  


What do you mean by enumeration?

0 Answers  


What is a string in javascript?

0 Answers  


Write a JavaScript function which can take any number of strings as arguments and outputs them as a single concatenated string.

4 Answers  


How do you trim in javascript?

0 Answers  


What is Unobtrusive JavaScript & Why it's Important?

0 Answers  


Categories