js判断undefined类型

正确方法:
if (typeof(reValue) === "undefined") { 
   alert("undefined"); 
}  

typeof 返回的是字符串,有六种可能:"number"、"string"、"boolean"、"object"、"function"、"undefined"

JS 中判断空值 undefined 和 null

原文地址:https://www.cnblogs.com/yangai/p/10045526.html