Here is a simple function isNumeric in javascript to check if a given string is numeric or not. function IsNumeric(val) { if (isNaN(parseFloat(val))) { return false; } return true }