VBScriptののisEmpty機能
isEmpty関数は、指定された変数が初期化されているかどうかを示すブール値を返します。 初期化されていない変数は、そうでなければFalse、Trueを返します。
文法
IsEmpty(expression)
参数 | 描述 |
---|---|
expression | 必需。一个表达式(通常是一个变量名)。 |
例
例
<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>
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>
上記の出力の例:
True
False
True
False
False
True
False
»をお試しください
完全なVBScriptのリファレンス