判断值是否为undefined

用 typeof判断


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

猜你喜欢

转载自www.cnblogs.com/ybixian/p/9577619.html