javascript检测浏览器flash版本的实现代码
2026-01-17 16:18:37 作者:用户投稿
记录:
复制代码 代码如下:
(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即无插件
})()
联络方式:
4008905355
邮箱:9196886@qq.com
Q Q:9196886
微信二维码
