Home  >  Article  >  Web Front-end  >  JavaScript监测ActiveX控件是否已经安装过的代码_javascript技巧

JavaScript监测ActiveX控件是否已经安装过的代码_javascript技巧

WBOY
WBOYOriginal
2016-05-16 19:01:25996browse

function detectPlugin(CLSID,functionName)
{
var pluginDiv = document.createElement("

")
document.body.insertBefore(pluginDiv);
pluginDiv.innerHTML = '';
try
{
if(eval("objectForDetectPlugin." + functionName) == undefined)
{
pluginDiv.removeNode(true);//删除pluginDiv及其所有的子元素
return false;
}
else
{
pluginDiv.removeNode(true);//删除pluginDiv及其所有的子元素
return true;
}
}
catch(e)
{
return false;
}
}
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn