وظيفة VBScript IsNumeric

التعريف والاستخدام

يمكن للوظيفة IsNumeric العودة إلى قيمة منطقية تشير إلى ما إذا كان التعبير المحدد يمكن حسابه كعدد. إذا كان يمكن حسابه كعدد، فإنه يعود إلى True، وإلا يعود إلى False.

التعليقات:إذا كان تعبير التاريخ يعود False فإن IsNumeric

النحو

IsNumeric(expression)
الم 参数 وصف
expression مطلوب. تعبير.

مثال

dim x
x=10
document.write(IsNumeric(x))
x=Empty
document.write(IsNumeric(x))
x=Null
document.write(IsNumeric(x))
x="10"
document.write(IsNumeric(x))
x="911 Help"
document.write(IsNumeric(x))

الإخراج المنفرد:

True
True
False
True
False