前端非空方法

function isEmpty(obj) {
if (typeof obj === 'undefined' || obj == null || obj === '') {
return true;
} else {
return false;
}
}
原文地址:https://www.cnblogs.com/zayr/p/12884084.html