Hàm IsEmpty của VBScript

Định nghĩa và cách sử dụng

Hàm IsEmpty có thể trả về giá trị布尔 của biến có được khởi tạo hay không. Nếu chưa được khởi tạo, thì trả về true, nếu không thì trả về False.

Cú pháp

IsEmpty(expression)
Tham số Mô tả
expression Bắt buộc. Bao gồm biểu thức (thường là tên biến).

Mô hình

dim x
document.write(IsEmpty(x))
x=10
document.write(IsEmpty(x))
x=Empty
document.write(IsEmpty(x))
x=Null
document.write(IsEmpty(x))

In ra riêng biệt:

True
False
True
False