Friday, April 13, 2018

Check for Digit Number in JavaScript

A very simple script that I wrote using JavaScript to check if the given value of the user is number or not.

I am currently accepting programming work, it project, school programming projects , thesis and capstone projects, IT consulting work and web development work kindly contact me in the following email address for further details. Thank you.

My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.


Program Listing

num.htm

<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>Check for Digit Number in JavaScript</title>
<script language="JavaScript">
<script language="javascript">
function checkDigitals()
{
if(isNaN(myForm.num.value)){
  alert("Please enter a digital number!");
  myForm.num.focus();
  myForm.num.value=""
  return (false);
}
else
{
alert("Input correct!");
}
}
</script>
<body>
<br>
<h4> 
<div align="center">Check Digital Input
</div></h4>
<form name=myForm>
  <div align="center">
    <input type=text name=num size=25>
    <input type=button onClick="checkDigitals()" value= "Check Digitals">
  </div>
</form>
</body>
</html>


No comments:

Post a Comment