Tu pourrais éviter de mettre 10 smileys inutiles en un seul post s'il te plait?
Sinon,
Code :
function isInteger(k) { return !isNaN(parseInt(k), 10); }
|
pour savoir si ca commence par un entier en base 10 ("b99$" sera refusé mais "99$" sera accepté car parsé comme "99" )
Code :
function isNumber(k) { return !isNaN(parseFloat(k)); }
|
Si tu veux savoir si ça contient uniquement des caractères numériques, regular expressions.
Message édité par masklinn le 31-10-2007 à 19:09:59
---------------
I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing?