var mydata=document.SignUP.txtZip.value;//here the name of the form is “SignUp” and name of the text field on which i want to enforce numerical characters is “txtZip“
for(var i=0;i < mydata.length;i++)
{
var mydigit = mydata.charAt(i);
if(mydigit < "0" || mydigit > "9")
{
alert('Please Enter a Numeric value');
document.SignUP.txtZip.focus();
return false;
}
}