Search w3schools.com:

SHARE THIS PAGE

VBScript IsNull Function


VBScript Reference Complete VBScript Reference

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

Syntax

IsNull(expression)

Parameter 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 output of the code above will be:

False
False
False
True

Try it yourself »

VBScript Reference Complete VBScript Reference

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]