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