<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>判断是否安装了flash插件</title>
<script src="jquery.js"></script>
</head>
<script type="text/javascript" language="JavaScript">
FlashMode = 0;
if (navigator.plugins && navigator.plugins.length > 0)
{
if (navigator.plugins["Shockwave Flash"])
{
var plugin_version = 0;
var words = navigator.plugins["Shockwave Flash"].description.split(" ");
for (var i = 0; i < words.length; ++i)
{
if (isNaN(parseInt(words[i])))
continue;
plugin_version = words[i];
}
if (plugin_version >= 5)
{
var plugin = navigator.plugins["Shockwave Flash"];
var numTypes = plugin.length;
for (j = 0; j < numTypes; j++)
{
mimetype = plugin[j];
if (mimetype)
{
if (mimetype.enabledPlugin && (mimetype.suffixes.indexOf("swf") != -1))
FlashMode = 1;
// Mac wierdness
if (navigator.mimeTypes["application/x-shockwave-flash"] == null)
FlashMode = 0;
}
}
}
}
}
if (FlashMode == 1){
document.write('');
}else{
alert('系统检测到您尚未安装Flash Player或Flash Player版本过低,请安装最新版本!');window.open('http://get.adobe.com/cn/flashplayer/','_blank');
}
</script>
<body>
</body>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>判断是否安装了flash插件</title>
<script src="jquery.js"></script>
</head>
<script type="text/javascript" language="JavaScript">
FlashMode = 0;
if (navigator.plugins && navigator.plugins.length > 0)
{
if (navigator.plugins["Shockwave Flash"])
{
var plugin_version = 0;
var words = navigator.plugins["Shockwave Flash"].description.split(" ");
for (var i = 0; i < words.length; ++i)
{
if (isNaN(parseInt(words[i])))
continue;
plugin_version = words[i];
}
if (plugin_version >= 5)
{
var plugin = navigator.plugins["Shockwave Flash"];
var numTypes = plugin.length;
for (j = 0; j < numTypes; j++)
{
mimetype = plugin[j];
if (mimetype)
{
if (mimetype.enabledPlugin && (mimetype.suffixes.indexOf("swf") != -1))
FlashMode = 1;
// Mac wierdness
if (navigator.mimeTypes["application/x-shockwave-flash"] == null)
FlashMode = 0;
}
}
}
}
}
if (FlashMode == 1){
document.write('');
}else{
alert('系统检测到您尚未安装Flash Player或Flash Player版本过低,请安装最新版本!');window.open('http://get.adobe.com/cn/flashplayer/','_blank');
}
</script>
<body>
</body>
</html>
此文为原著,如需转载复制,请注明历史来源,http://blog.csdn.net/qq_22327455