VBScript TypeName º¯Êý

¶¨ÒåºÍÓ÷¨

TypeName º¯Êý¿ÉÖ¸¶¨±äÁ¿µÄ×ÓÀàÐÍ¡£

TypeName º¯Êý¿É·µ»ØµÄÖµ£º

Öµ ÃèÊö
Byte ×Ö½ÚÖµ
Integer ÕûÐÍÖµ
Long ³¤ÕûÐÍÖµ
Single µ¥¾«¶È¸¡µãÖµ
Double Ë«¾«¶È¸¡µãÖµ
Currency »õ±ÒÖµ
Decimal Ê®½øÖÆÖµ
Date ÈÕÆÚ»òʱ¼äÖµ
String ×Ö·û´®Öµ
Boolean Boolean Öµ£»True »ò False
Empty δ³õʼ»¯
Null ÎÞÓÐЧÊý¾Ý
<object type> ʵ¼Ê¶ÔÏóÀàÐÍÃû
Object Ò»°ã¶ÔÏó
Unknown δ֪¶ÔÏóÀàÐÍ
Nothing »¹Î´ÒýÓöÔÏóʵÀýµÄ¶ÔÏó±äÁ¿
Error ´íÎó

Óï·¨

TypeName(varname)
²ÎÊý ÃèÊö
varname ±ØÐèµÄ¡£±äÁ¿µÄÃû³Æ¡£

ʵÀý

dim x
x="Hello World!"
document.write(TypeName(x))
x=4
document.write(TypeName(x))
x=4.675
document.write(TypeName(x))
x=Null
document.write(TypeName(x))
x=Empty
document.write(TypeName(x))
x=True
document.write(TypeName(x))

Êä³ö£º

String
Integer
Double
Null
Empty
Boolean
VUE