function funExists(funName){
try{
if(typeof eval(funName)=="undefined"){return false;}
if(typeof eval(funName)=="function"){return true;}
}catch(e){
return false;
}
}
对于当前窗口的某个函数,可以直接用,比如函数change,则可以用funExists(change);
对于父窗口,则可以使用这样的形式判断funExists(window.opener.change),其他以此类推