To Validate Only Digits Using JavaScript

Chikul
Posted by Chikul under JavaScript category on | Views : 2700
//To accept only Digits
//Use this function at the time of keyup

function isDigit(evt)
{
var charCode = (evt.which) ? evt.which : event.keyCode
if (charCode > 47 && charCode < 58)
{
return true;
}
else
{
return false;
}
}

Comments or Responses

Login to post response