核心程式碼
//是否存在指定函數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;}更多的判斷可以參考這篇文章://www.VeVB.COm/article/67551.htm