当前位置: 代码迷 >> JavaScript >> javascript判断某个函数是不是存在
  详细解决方案

javascript判断某个函数是不是存在

热度:508   发布时间:2012-10-08 19:54:56.0
javascript判断某个函数是否存在
//instanceof & typeof
      function fnExist(fnName) {
		//return fnName in this && eval(fnName) instanceof Function;
		return fnName in this && typeof (eval(fnName)) == "function";
      }
  相关解决方案