VBScript IsNumeric Function
Definition and Usage
The IsNumeric function can return a boolean value indicating whether the specified expression can be calculated as a number. If it can be calculated as a number, it returns True, otherwise it returns False.
Note:If the expression is a date expression, IsNumeric returns False.
Syntax
IsNumeric(expression)
Parameter | Description |
---|---|
expression | Required. Expression. |
Example
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))
Output separately:
True True False True False