js代码:

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

js调用:

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

 

相关文章:

  • 2022-02-21
  • 2022-02-04
  • 2021-05-31
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-02-09
  • 2022-01-01
  • 2021-12-04
  • 2021-11-27
  • 2022-02-10
  • 2021-12-04
  • 2021-12-04
相关资源
相似解决方案