The IsEmpty function returns a Boolean value that indicates whether a specified variable has been initialized or not. It returns true if the variable is uninitialized; otherwise, it returns False.
IsEmpty 函数可返回 Boolean 值指明变量是否已初始化。
语法
参数 | 描述 |
expression | Required. An expression (most often a variable name) 必选项。expression 参数可以是任意表达式。(通常为变量名) |
实例 1
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)) 输出: True False True False |