JavaScript中判断对象的值是否为undefined、null 1.判断 undefined if (typeof(值) == "undefined") 2.判断 null if (!值 && typeof(值)!=”undefined” && 值 !=0)