Javascript:检测FlashPlayer版本的函数

<!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--> function getFlashVer(){ // 获得flashplayer的版本google
var f = "" ,n = navigator;
if (n.plugins && n.plugins.length){
for ( var ii = 0 ;ii < n.plugins.length;ii ++ ){
if (n.plugins[ii].name.indexOf('ShockwaveFlash') !=- 1 ){
f
= n.plugins[ii].description.split('ShockwaveFlash')[ 1 ];
break ;
}
}
}
else if (window.ActiveXObject){
for ( var ii = 10 ;ii >= 2 ;ii -- ){
try {
var fl = eval( " newActiveXObject('ShockwaveFlash.ShockwaveFlash. " + ii + " '); " );
if (fl){f = ii + '. 0 '; break ;}
}
catch (e){}
}
}
document.write(
" 您的FlashPlayer版本为<b> " + f + " </b> " );
}

你可能感兴趣的:(JavaScript,F#,Google)