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
Release: 2016-05-16 19:01:25
Original
1052 people have browsed it

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;
}
}
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template