NaN具有独特的数学属性,任何涉及该属性的比较运算都计算为false。改用全局isNaN()函数检测NaN值,如下面的示例所示:
trace(NaN==NaN);//false!
trace(NaN!=NaN);//还是false!
trace(isNaN(NaN));//true
Powered by: 博客园 Copyright © 2024 Bill Yuan Powered by .NET 9.0 on Kubernetes