Latest web development tutorials

VBScript IsNumeric function

VBScript Reference Complete VBScript Reference

IsNumeric function returns a Boolean value indicating whether an expression specified can be calculated as a number. If the expression as the numbers to calculate returns True, otherwise False.

Note: If the expression is a date, IsNumeric function returns False.

grammar

IsNumeric(expression)

参数 描述
expression 必需。一个表达式。

Examples

Examples

<script type="text/vbscript">

Dim x
x=10
document.write(IsNumeric(x) & "<br />")
x=Empty
document.write(IsNumeric(x) & "<br />")
x=Null
document.write(IsNumeric(x) & "<br />")
x="10"
document.write(IsNumeric(x) & "<br />")
x="911 Help"
document.write(IsNumeric(x))

</script>

Examples of the above output:

True
True
False
True
False

try it"

VBScript Reference Complete VBScript Reference