js判断处理undefined类型的数据

code:

resFlag = response.result.data.result;
/查询客户为白名单用户时,将"*该企业已被列入黑名单"标记清除
if(typeof resFlag == "undefined"){
    $("#companynameisblack").text("");
}

  

原文地址:https://www.cnblogs.com/xh_Blog/p/8819696.html