function detectPlugin(CLSID,functionName)
{
var pluginDiv = document.createElement("<div id=\"pluginDiv\" style=\"display:none\"></div>")
document.body.insertBefore(pluginDiv);
pluginDiv.innerHTML = '<object id="objectForDetectPlugin" classid="CLSID:'+ CLSID +'"></object>';
try
{
if(eval("objectForDetectPlugin." + functionName) == undefined)
{
pluginDiv.removeNode(true);//删除pluginDiv及其所有的子元素
return false;
}
else
{
pluginDiv.removeNode(true);//删除pluginDiv及其所有的子元素
return true;
}
}
catch(e)
{
return false;
}
}
安装
activex控件
activex
JavaScript