TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Validation Of Email Id Which Given By User
Ghanashyam Nayak
Apr 29, 2020
4.6
k
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
It Will Check The User's Given Email Id Using The Javascript....
<html>
<head>
<title>Sample Code</title>
<script type=
"text/javascript"
>
function
CheckEmail(strEmail)
{
var
objRegex = /(^[a-z]([a-z_\.]*)@([a-z_\.]*)([.][a-z]{3})$)|(^[a-z]([a-z_\.]*)@([a-z_\.]*)(\.[a-z]{3})(\.[a-z]{2})*$)/;
//Check Here Email String
var
test=objRegex.test(strEmail);
if
(test=
true
)
{
alert(
"Your Given Email Id Is \""
+strEmail+
"\" Correct."
);
}
else
{
alert(
"Your Given Email Id Is Not \""
+strEmail+
"\" Correct."
);
}
}
</script>
</head>
<body bgcolor=#00ff00 alink=blue vlink=blue>
<FORM name=
"windowEvent"
>
Email : <input type=
"text"
name=
"txtemail"
/>
<input type=
"button"
value=
"Check Email"
name=
"btnEmail"
onClick=
"CheckEmail(txtemail.value)"
/>
</FORM>
</body>
</html>
Validation Of Email Id Which Given By User
Next Recommended Reading
Javascript-Remove Comma from the given user's string.