var isIE = !-[1,];
if(isIE){
try{
var swf1 = new ActiveXObject(‘ShockwaveFlash.ShockwaveFlash‘);
alert(‘安装了Flash‘);
}
catch(e){
alert(‘没有安装Flash‘);
}
}
else {
try{
var swf2 = navigator.plugins[‘Shockwave Flash‘];
if(swf2 == undefined){
alert(‘没有安装Flash‘);
}
else {
alert(‘安装了Flash‘);
}
}
catch(e){
alert(‘没有安装Flash‘);
}
}
其他参考地址:https://github.com/AlloyTeam/JM/blob/master/src/jm.browser.js
JS 判断浏览器是否安装Flash 兼容IE、firefox
原文:http://www.cnblogs.com/vivijs/p/4097900.html