儘管相當清楚的documentation它說,parseFloat()可以返回NaN的一個值,當我寫一個塊,如:在ActionScript(NaN == parseFloat(input.text))中警告它始終爲false。爲什麼?
if (NaN == parseFloat(input.text)) {
errorMessage.text = "Please enter a number."
}
我警告說,比較將始終是假的。測試顯示警告是正確的。
正確的文檔在哪裏,我如何編寫這個文件來與AS3一起工作?
因此,即使:如果(NAN == NAN){/ *無法訪問* /} – dlamblin 2008-09-29 20:54:05