VBScript IsNullFunction


VBScript 参考手册Complete VBScript Reference Manual

The IsNull function returns a Boolean value that indicates whether the specified expression contains invalid data (Null). It returns True if the expression is Null, otherwise it returns False.

Syntax

IsNull(expression)

Parameters Description
expression Required. An expression.

Example

Example

<script type="text/vbscript">

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

</script>

The above example outputs:

False
False
False
True

Try it yourself »

VBScript 参考手册Complete VBScript Reference Manual Other Extensions