shuilangyizu

js判断字符是否为空的方法:

//判断字符是否为空的方法
function isEmpty(obj){
    if(typeof obj == "undefined" || obj == null || obj == ""){
        return true;
    }else{
        return false;
    }
}

 使用示例:

if (!isEmpty(value)) {
    alert(value);
}

 

分类:

技术点:

相关文章:

  • 2021-12-14
  • 2021-12-14
  • 2021-06-11
  • 2021-12-04
  • 2021-11-27
  • 2021-08-07
猜你喜欢
  • 2022-02-10
  • 2021-11-04
  • 2021-11-27
  • 2021-12-14
  • 2022-01-01
  • 2021-11-04
相关资源
相似解决方案