How to validate as input as Number using Jquery?
My code:
<!DOCTYPE html>
<html>
<head>
<script>
function myFunction(value)
{
alert('Is it number');
if(isNan()){}
}
</script>
</head>
<body>
Number: <input type="text" name="FirstName" value="Mickey"><br>
<button onclick="myFunction(this)">Click me</button>
</body>
</html>
Is it possible to validate the input as number only?.User enters a non number it throws a alert"Its a non number".