Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Validation Of Email Id Which Given By User
WhatsApp
Ghanashyam Nayak
4y
4.7
k
0
0
25
Blog
<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
Up Next
Javascript-Remove Comma from the given user's string.
Ebook Download
View all
Voice of a Developer: JavaScript From Scratch
Read by 10.9k people
Download Now!
Learn
View all
Membership not found