In JS c'e` la funzione isNaN (is Not A Number).

Oppure puoi fare un test con le regexp:

if(str.match(/^[\d\.]$/) alert("campo solo numerico")