String.prototype.trim = function () { return this.replace(/(^\s*)|(\s*$)/g, ''); } function isEmpty(obj) { if (typeof obj === "undefined" || obj == null || obj.trim() == "") { return true; } else { return false; } }
js判断字符串是否为空,多个空格也算为空
猜你喜欢
转载自www.cnblogs.com/yongfengnice/p/11060926.html
今日推荐
周排行