Javascript Example
Screen shot
Javascript code to validate Numeric value.
<html>
<head>
<title>Javascript Mobile Number Validation</title>
<script language=\"javascript\">
function validate()
{
if(isNaN(document.frm.mobile.value))
{
alert(\"Mobile Number should be numeric\");
document.frm.mobile.focus();
return false;
}
return true;
}
</script>
</head>
<body>
<form name=\"frm\" action=\"\" method=\"post\" onSubmit=\"return validate()\">
<table border=\"1\" align=\"center\">
<tr>
<td>Mobile Number</td>
<td><input name=\"mobile\" type=\"text\"></td>
</tr>
<td colspan=\"2\">
<input name=\"btnsubmit\" type=\"submit\" value=\"Submit\">
</td>
</tr>
</table>
</form>
</body>
</html>

You can download source code here