如果js中没有定义变量,例如js中直接判断
if(a == undefined){
return false;
}
则会报错a is undfined,要使用typeof(a) == 'undefined'