162008
 

这个还是很有用的,特别是Flex对Flash Player的版本要求还是有那么点高的。

记录一下,呵呵:)

<script type=”text/javascript”>
function getFlashVer() {
var f=””;
var n=navigator;
if (n.plugins && n.plugins.length) {
for (var ii=0;ii<n.plugins.length;ii++) {
if (n.plugins[ii].name.indexOf(‘Shockwave Flash’)!=-1) {
f=n.plugins[ii].description.split(‘Shockwave Flash ‘)[1].split(‘ ‘)[0];
break;
}
}
} else if (window.ActiveXObject) {
for (var ii=10;ii>=2;ii–) {
try {
var fl=eval(“new ActiveXObject(‘ShockwaveFlash.ShockwaveFlash.”+ii+”‘);”);
if (fl) {f=ii + ‘.0′; break; }
}
catch(e) {}
}
}
document.write(“Flash Player version: <b>”+f+”</b>”);
}
getFlashVer();
</script>

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>