VBScript IsNull Function
IsNull function returns a Boolean value indicating whether an expression specified contains invalid data (Null). If the expression is Null returns True, otherwise False.
grammar
IsNull(expression)
参数 | 描述 |
---|---|
expression | 必需。一个表达式。 |
Examples
Examples
<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>
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>
Examples of the above output:
False
False
False
True
False
False
True
try it"
Complete VBScript Reference