I’ve only been trying it in Firefox’s JavaScript console, but neither of the following statements return true:
parseFloat(\'geoff\') == NaN;
parseFloat(\'ge
alert("1234567890.".indexOf(String.fromCharCode(mycharacter))>-1);
This is not elegant. but after trying isNAN() I arrived at this solution which is another alternative. In this example I also allowed '.' because I am masking for float. You could also reverse this to make sure no numbers are used.
("1234567890".indexOf(String.fromCharCode(mycharacter))==-1)
This is a single character evaluation but you could also loop through a string to check for any numbers.