判断是否安装flash

function isFlash(){
var isIE = !-[1,];
if(isIE){
try{
var swf1 = new ActiveXObject('ShockwaveFlash.ShockwaveFlash');
}
catch(e){
return false;
}
}
else {
try{
var swf2 = navigator.plugins['Shockwave Flash'];
if(swf2 == undefined){
return false;
}
}
catch(e){
return false;
}
}
return true;
}

posted @ 2014-04-24 14:05  嘣嘣  阅读(133)  评论(0编辑  收藏  举报