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
Check The Validation For Only Integer Number
WhatsApp
Ghanashyam Nayak
4y
4.9
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
CheckInteger(b)
{
var
a = /(^-?\d\d*$)/;
if
(a.test(b))
{
alert(
'Your Given Input "'
+ b +
'" Is Correct.'
)
}
else
{
alert(
'Your Given Input"'
+ b +
'" Is Not Correct.'
)
}};
</script>
</head>
<body bgcolor=#00ff00 alink=blue vlink=blue>
<FORM name=
"windowEvent"
>
Number : <input type=
"text"
name=
"txtnumber"
/>
<input type=
"button"
value=
"Check Integer"
name=
"btnCheckInteger"
onClick=
"CheckInteger(txtnumber.value)"
/>
</FORM>
</body>
</html>
Check The Validation For Only Integer Number
Up Next
Javascript-Check indian mobile number validation
Ebook Download
View all
Voice of a Developer: JavaScript From Scratch
Read by 11k people
Download Now!
Learn
View all
Membership not found