function test() { var x = '92385'; if (isNumber(x)) if (x.charAt(0) == '9') { alert("Success"); } } function isNumber(n) { return !isNaN(parseFloat(n)) && isFinite(n); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)