Latest web development tutorials

VBScript IsEmpty Function

VBScript Reference Complete VBScript Reference

IsEmpty function returns a Boolean value indicating whether the specified variable has been initialized. If uninitialized variable returns True, otherwise False.

grammar

IsEmpty(expression)

参数 描述
expression 必需。一个表达式(通常是一个变量名)。

Examples

Examples

<script type="text/vbscript">

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

</script>

Examples of the above output:

True
False
True
False

try it"

VBScript Reference Complete VBScript Reference