Skip to content

Instantly share code, notes, and snippets.

for (i=0; i<foo.length; i++)
{
if (foo.charAt(i)<"0")
{
alert("Your foo is not numeric.");
return false;
}
if (foo.charAt(i)>"9")
{
alert("Your foo is not numeric.");