JS判断是否存在指定变量函数:
function isExitsVariable(variableName) {
try {
if (typeof(variableName) == "undefined") {
return false;
} else {
return true;
}
} catch(e) {}
return false;
}
(adsbygoogle = window.adsbygoogle || []).push({});
来源:https://www.02405.com/archives/1718