Give code Email Checking
Answers were Sorted based on User's Feedback
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 |
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 |
How do we get javascript onto a web page?
How do I run code in browser console?
Create a new javascript object with the keys of “fname” equal to your first name, “lname” equal to your last name, and “fcolors” equal to and array of 3 of your favorite colors. Assign this object to a variable called “me” and log it to the console.
What is the role of javascript in html?
List some design patterns in javascript?
What is the microsoft version of javascript?
How do browsers work?
What is a module in javascript?
What are the javascript objects?
What is javascript ‘strict mode’?
What is are the types of the pop up box es available in javascript?
What are the different types of errors available in javascript?