<!--判断用户浏览器是否安装了Flash插件-->
<SCRIPT type="text/javascript">
var i_flash;
var v_flash;
// Netscape 
if (navigator.plugins) {
for (var i=0; i < navigator.plugins.length; i++) {
if (navigator.plugins[i].name.toLowerCase().indexOf("shockwave flash") >= 0) {
i_flash = true;
v_flash = navigator.plugins[i].description.substring(navigator.plugins[i].description.toLowerCase().lastIndexOf("flash ") + 6, navigator.plugins[i].description.length);
}
}
}
</SCRIPT>
<!--VBScript方法-->
<SCRIPT type="text/vbscript">
//IE
on error resume next
set f = CreateObject("ShockwaveFlash.ShockwaveFlash")
if IsObject(f) then
i_flash = true
v_flash = hex(f.FlashVersion())
end if
</SCRIPT>
<!--JavaScript方法-->
<SCRIPT type="text/javascript">
if (i_flash) {
document.writeln("Flash插件已安装!")
if (v_flash) {
document.writeln(" - 版本 " + v_flash);
}
} else {
document.writeln("Flash插件未安装!")
}
</SCRIPT>