String.prototype.isEmpty = function () { var s1 = this.replace(/[\r\n]/g, ‘‘).replace(/[ ]/g, ‘‘), s2 = (s1 == ‘‘) ? true : false; return s2; };
$(this).html().isEmpty();
Posted 每天增长一点点
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了js中判断 .html() 是否为空相关的知识,希望对你有一定的参考价值。
String.prototype.isEmpty = function () { var s1 = this.replace(/[\r\n]/g, ‘‘).replace(/[ ]/g, ‘‘), s2 = (s1 == ‘‘) ? true : false; return s2; };
$(this).html().isEmpty();
以上是关于js中判断 .html() 是否为空的主要内容,如果未能解决你的问题,请参考以下文章