Highlights
All Snippets
Top 100 Snippets
Librarians
gbCodeLib

By Language
VB6
JavaScript
Perl
HTML
SQL
Java
DOS

GBIC >> Source Code >> JavaScript >> Snippet

Check for numeric values


function IsNumeric (myString) {
    var numbers = "0123456789"
    var result = true
    for (x = 0; x < myString.length; x ++ ) {
        var char = myString.charAt(x)
        if (numbers.indexOf( char ) == - 1) {
           result = false
            break
        }
    }
    return result
}