判断值是否为undefined

用 typeof判断


if(typeof value === 'undefined'){
    ...
}else {
 ...
}

转载于:https://www.cnblogs.com/ybixian/p/9577619.html