function fnExist(fnName) { return fnName in this && typeof (eval(fnName)) == "function"; } 转自:http://qitonghui.iteye.com/blog/1063460