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
Javascript-Check Indian Zipcode.
Ghanashyam Nayak
Apr 30, 2020
51.3
k
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
This code shows you that how you can check indian Zp code at runtime, which given by user.
<!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN"
>
<html>
<head>
<title>Sample Code</title>
<script type=
"text/javascript"
>
function
CheckIndianZipCode(b)
{
var
a = /(^\d{6}$)/;
if
(a.test(b))
{
alert(
"Your Entered Zip Code Is Valid."
)
}
else
{
alert(
"Your Entered Zip Code Is Not Valid."
)
}
};
</script>
</head>
<body bgcolor=#00ff00 alink=blue vlink=blue>
<FORM name=
"windowEvent"
>
Enter String : <input type=
"text"
name=
"txtOriginal"
/><br>
<input type=
"button"
value=
"Check"
name=
"btnIndianZipCode"
onClick=
"CheckIndianZipCode(txtOriginal.value);"
/>
</FORM>
</body>
</html>
Javascript-Check Indian Zipcode.
Next Recommended Reading
Javascript-Check indian mobile number validation