Answer Posted / 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 View All Answers
How to find radio button selection when a form is submitted?
What is a closure and how do you use it?
What is js full form?
What is a null variable in javascript?
Explain the working of timers in javascript?
What is the difference between local storage & session storage?
I need project details about WEB CONTENT FILTERING USING NEURAL NETWORKS and how to explain it....plz help me in this topic.....
How to delete a cookie using javascript?
What is differential inheritance?
What is eager initialization in java?
Is javascript a dynamic language?
Between JavaScript and an ASP script, which is faster?
Is javascript necessary?
What is an onclick?
Which built-in method returns the string representation of the number’s value?