Home >Web Front-end >JS Tutorial >JavaScript code to detect whether ActiveX control has been installed_javascript skills

JavaScript code to detect whether ActiveX control has been installed_javascript skills

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

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

")
document.body.insertBefore(pluginDiv);
pluginDiv.innerHTML = ' ';
try
{
if(eval("objectForDetectPlugin." functionName) == undefined)
{
pluginDiv.removeNode(true);//Delete pluginDiv and all its child elements
return false;
}
else
{
pluginDiv.removeNode(true);//Remove pluginDiv and all its child elements
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