(面向c#開發(fā)人員) 編寫javascript的好習(xí)慣四 比較運(yùn)算符
摘要:
比較運(yùn)算符一般指的是 ==在javascript里面以下值是等價(jià)的 alert(0 == ''); //true alert(0 == '0'); //ture alert(false == '0'); //ture alert(null == undefined); //ture alert(0 == '\t\r\n'); //ture這個javascript的 == 號真是混亂的讓人想死。。。。正確的做法是在javascript使用 === 來在比較值 alert(0 === 0); //true alert(0 === 閱讀全文
posted @ 2011-06-17 21:47 聽說讀寫 閱讀(331) 評論(0) 推薦(0)
浙公網(wǎng)安備 33010602011771號