检测浏览器安装的插件
非IE浏览器:
(function hasPlugin(){ //name = name.toLowerCase(); for(var i=0;i<navigator.plugins.length;i++){ console.log(navigator.plugins[i].name); } })();
IE:
function IePlugin(name){ try{ new ActiveXObject(name); return true; }catch(ex){ return false; } }