Allow user to enter only character and numbers

function onlyNumbers(evt)
{
var e = event || evt; // for trans-browser compatibility
var charCode = e.which || e.keyCode;
if (charCode >= 48 || charCode <= 57 && charCode == 110)
return true;

return false;

}

Comments