Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Javascript-Check indian mobile number validation
WhatsApp
Ghanashyam Nayak
4y
78.5
k
0
0
25
Blog
<!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN"
>
<html>
<head>
<title>Sample Code</title>
<script type=
"text/javascript"
>
function
CheckIndianNumber(b)
{
var
a = /^\d{10}$/;
if
(a.test(b))
{
alert(
"Your Mobile Number Is Valid."
)
}
else
{
alert(
"Your Mobile Number Is Not Valid."
)
}
};
</script>
</head>
<body bgcolor=#00ff00 alink=blue vlink=blue>
<FORM name=
"windowEvent"
>
Indian Mobile Number : <input type=
"text"
name=
"txtmobilenumber"
/>
<input type=
"button"
value=
"Check"
name=
"btnIndianMobileNumber"
onClick=
"CheckIndianNumber(txtmobilenumber.value)"
/>
</FORM>
</body>
</html>
Javascript-Check indian mobile number validation
Up Next
Javascript-Check Indian Zipcode.
Ebook Download
View all
Voice of a Developer: JavaScript From Scratch
Read by 11k people
Download Now!
Learn
View all
Membership not found