javascript检测浏览器flash版本的实现代码
时间:2021-05-26 08:15:36|栏目:JavaScript代码|点击: 次
记录:
(function(){
ver has=0, ver=0;
try{
has=new ActiveXObject('ShockwaveFlash.ShockwaveFlash');
if(has) {
ver = +(has.GetVariable("$version").match(/\d+/));
}
}
catch(e){
has=navigator.plugins["Shockwave Flash"];
if(has) {
ver = +(has.description.match(/\d+/));
}
}
console.log(ver);//0即无插件
})()
复制代码 代码如下:
(function(){
ver has=0, ver=0;
try{
has=new ActiveXObject('ShockwaveFlash.ShockwaveFlash');
if(has) {
ver = +(has.GetVariable("$version").match(/\d+/));
}
}
catch(e){
has=navigator.plugins["Shockwave Flash"];
if(has) {
ver = +(has.description.match(/\d+/));
}
}
console.log(ver);//0即无插件
})()
上一篇:兼容多浏览器的iframe自适应高度(ie8 、谷歌浏览器4.0和 firefox3.5.3)
栏 目:JavaScript代码
本文标题:javascript检测浏览器flash版本的实现代码
本文地址:http://www.codeinn.net/misctech/129434.html






