Fonction IsNumeric VBScript
Définition et utilisation
La fonction IsNumeric peut retourner une valeur booléenne indiquant si l'expression spécifiée peut être calculée comme un nombre. Si elle peut être calculée comme un nombre, elle retourne True, sinon elle retourne False.
Remarque :Si l'expression est une expression de date, IsNumeric retourne False.
Syntaxe
IsNumeric(expression)
Paramètres | Description |
---|---|
expression | Expression nécessaire. |
Exemple
dim x x=10 document.write(IsNumeric(x)) x=Empty document.write(IsNumeric(x)) x=Null document.write(IsNumeric(x)) x="10" document.write(IsNumeric(x)) x="911 Help" document.write(IsNumeric(x))
Sortie séparée :
True True False True False