不兼容IE
function inspectPlugin(name){
name = name.toLowerCase();
for(var i=0;i<navigator.plugins.length;i++){
if(navigator.plugins[i].name.toLowerCase().indexOf(name) > -1){
return "浏览器安装"+name
}
}
return "请安装"+name
}
console.log(inspectPlugin("flash"));