js判斷空(暫時)

轉自:https://zhidao.baidu.com/question/262530264155162685.html 一般判斷爲空有 null值、undefined值與NaN值 判斷undefined: var tmp = undefined;if (typeof(tmp) == "undefined"){    alert("undefined");} 說明:typeof 返回的是字符串,有
相關文章
相關標籤/搜索