//是否存在指定函数 
function isExitsFunction(funcName) {
    try {
        if (typeof(eval(funcName)) == "function") {
            return true;
        }
    } catch(e) {}
    return false;
}
//是否存在指定变量 
function isExitsVariable(variableName) {
    try {
        if (typeof(variableName) == "undefined") {
            //alert("value is undefined"); 
            return false;
        } else {
            //alert("value is true"); 
            return true;
        }
    } catch(e) {}
    return false;
}

 

相关文章:

  • 2022-12-23
  • 2021-10-21
  • 2021-11-15
  • 2022-12-23
  • 2021-12-22
  • 2022-12-23
  • 2022-12-23
  • 2021-11-09
猜你喜欢
  • 2021-08-16
  • 2022-12-23
  • 2022-12-23
  • 2021-07-11
  • 2021-06-15
  • 2022-12-23
相关资源
相似解决方案