Js sharing a verification function, and can verify null and undefined "" and "" if the time is not returns true, otherwise returns false
/**
* 为空校验函数校验undefined、null以及空字符串等
*/
var isNotNull = function (obj){
var result = true;
/*进行校验*/
switch (obj) {
case undefined:
case null:
result = false;
break;
}
if(result){
if(obj.replace(/\s+/g,"") == ""){//空字符串校验
result = false;
}
}
return result;
}