vue js如何判断字符是否为空

javascript判断字符是否为空的方法:首先判断字符是否为空,代码为【if(typeof res== "undefined" || res== null || res== "")】;

代码:

//判断字符是否为空的方法

IsEmpty(res){

    if(typeof res== "undefined" || res== null || res== ""){

        return true;

    }else{

        return false;

    }

}

 

参考:

javascript如何判断字符是否为空

posted @ 2022-07-27 09:46  BBS_自律  阅读(2527)  评论(0)    收藏  举报