if (typeof(值) == "undefined")
if (!值 && typeof(值)!=”undefined” && 值 !=0)
JavaScript中判断对象的值是否为undefined、null
原文:https://www.cnblogs.com/Anthony518/p/10897025.html