JS获取浏览器flash player版本信息

swfobject_1_5_test×××

1、是否是最新版本
<!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>
<meta http-equiv=”Content-Type” content=”text/html; charset=gb2312″ />
<title>Flash Player 在线检测、升级 – Flash Player Update</title>
<meta name=”keywords” content=”Flash Player,Flash播放器,在线检测,在线升级,在线安装” />
<meta name=”description” content=”Flash Player播放器在线检测、升级、安装” />
<script type=”text/javascript” src=”swfobject_1_5_test.js”></script>
</head>
<style type=”text/css”>
* {

 padding:0px 0px;
 margin:0px 0px;
 text-align:center;
}
</style>
<body>
<div style=”background:#f5f5f5; padding:50px 0px 20px 0px; border-bottom:1px solid #eeeeee;”>
  <h3 style=”margin:0px auto;”>Flash Player 在线检测、升级<span style=”font-weight:normal; font-size:12px;”> – 支持 IE / FireFox / Opera / Safari / Chrome 浏览器</span></h3>
</div>
<div id=”flashversion” style=”line-height:25px; font-size:16px; margin-top:100px;”>你没有安装flash播放器或者你的浏览器不支持!</div>
<div id=”getflashplayer” style=”border-top:1px solid #eeeeee; line-height:25px; font-size:16px; font-weight:bold; color:#0000FF; padding-top:5px; margin-top:100px;”>点击下方图标,下载最新 Adobe Flash Player<br />
  <a href=”http://www.adobe.com/go/getflashplayer” target=”_blank”><img src=”http://www.adobe.com/p_w_picpaths/shared/download_buttons/get_flash_player.gif” alt=”点击下载 Adobe Flash Player” title=”点击下载 Adobe Flash Player” border=”0″ /></a></div>
<script type=”text/javascript”>
// <![CDATA[
 function versionIsValid(get_version,version){

  if(get_version.major < version.major) return false;
  if(get_version.major > version.major) return true;
  if(get_version.minor < version.minor) return false;
  if(get_version.minor > version.minor) return true;
  if(get_version.build < version.build) return false;
  return true;
 }
 
 var version = new deconcept.PlayerVersion([11,5,502,146]);
 var version_txt =version[“major”] + “.” + version[“minor”] + “.” + version[“build”] + “.” + version[“revision”];
 
 var get_version = deconcept.SWFObjectUtil.getPlayerVersion();
 var get_version_txt = get_version[“major”] + “.” + get_version[“minor”] + “.” + get_version[“build”] + “.” + get_version[“revision”];
 
 if (document.getElementById && get_version[“major”] > 0){

  if(versionIsValid(get_version,version)){

   document.getElementById(“flashversion”).innerHTML=”当前使用版本:<strong><font color=’#0000FF’>”+ get_version_txt +”</font></strong><br />官方最新版本:<strong><font color=’#FF0000′>”+ version_txt +”</font></strong><br /><br /><strong><font color=’#FF0000′>恭喜您,您的flashPlayer已经是最新版本!</font></strong>”;
   //document.getElementById(“getflashplayer”).innerHTML=””;
  }
  else{

   document.getElementById(“flashversion”).innerHTML=”当前使用版本:<strong><font color=’#0000FF’>”+ get_version_txt +”</font></strong><br />官方最新版本:<strong><font color=’#FF0000′>”+ version_txt +”</font></strong><br /><br /><strong><font color=’#FF0000′>您的flashPlayer不是最新版本,请尽快升级!</font></strong>”;
  }
 }
// ]]>
</script>
</body>
</html>

2、是否是安全版本
<!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>
<meta http-equiv=”Content-Type” content=”text/html; charset=gb2312″ />
<title>Flash Player 在线检测、升级 – Flash Player Update</title>
<meta name=”keywords” content=”Flash Player,Flash播放器,在线检测,在线升级,在线安装” />
<meta name=”description” content=”Flash Player播放器在线检测、升级、安装” />
<script type=”text/javascript” src=”swfobject_1_5_test.js”></script>
</head>
<style type=”text/css”>
* {

 padding:0px 0px;
 margin:0px 0px;
 text-align:center;
}
</style>
<body>
<div style=”background:#f5f5f5; padding:50px 0px 20px 0px; border-bottom:1px solid #eeeeee;”>
  <h3 style=”margin:0px auto;”>Flash Player 在线检测、升级<span style=”font-weight:normal; font-size:12px;”> – 支持 IE / FireFox / Opera / Safari / Chrome 浏览器</span></h3>
</div>
<div id=”flashversion” style=”line-height:25px; font-size:16px; margin-top:100px;”>你没有安装flash播放器或者你的浏览器不支持!</div>
<div id=”getflashplayer” style=”border-top:1px solid #eeeeee; line-height:25px; font-size:16px; font-weight:bold; color:#0000FF; padding-top:5px; margin-top:100px;”>点击下方图标,下载最新 Adobe Flash Player<br />
  <a href=”http://www.adobe.com/go/getflashplayer” target=”_blank”><img src=”http://www.adobe.com/p_w_picpaths/shared/download_buttons/get_flash_player.gif” alt=”点击下载 Adobe Flash Player” title=”点击下载 Adobe Flash Player” border=”0″ /></a></div>
<script type=”text/javascript”>
// <![CDATA[
 function versionIsValid(get_version,version){

  if(get_version.major < version.major) return false;
  if(get_version.major > version.major) return true;
  if(get_version.minor < version.minor) return false;
  if(get_version.minor > version.minor) return true;
  if(get_version.build < version.build) return false;
  return true;
 }
 
 var version = new deconcept.PlayerVersion([11,1,0]);
 var version_txt =version[“major”] + “.” + version[“minor”] + “.” + version[“build”];
 
 var get_version = deconcept.SWFObjectUtil.getPlayerVersion();
 var get_version_txt = get_version[“major”] + “.” + get_version[“minor”] + “.” + get_version[“build”] + “.” + get_version[“revision”];
 
 if (document.getElementById && get_version[“major”] > 0){

  if(versionIsValid(get_version,version)){

   document.getElementById(“flashversion”).innerHTML=”当前使用版本:<strong><font color=’#0000FF’>”+ get_version_txt +”</font></strong><br />官方最新版本:<strong><font color=’#FF0000′>11.5.502.146</font></strong><br /><br /><strong><font color=’#FF0000′>”+ version_txt +”和更早版本存在高危漏洞!<br />恭喜您,您的flashPlayer没有问题!</font></strong>”;
  }
  else{

   document.getElementById(“flashversion”).innerHTML=”当前使用版本:<strong><font color=’#0000FF’>”+ get_version_txt +”</font></strong><br />官方最新版本:<strong><font color=’#FF0000′>11.5.502.146</font></strong><br /><br /><strong><font color=’#FF0000′>”+ version_txt +”和更早版本存在高危漏洞!<br />您的flashPlayer版本过低,存在风险,请尽快升级!</font></strong>”;
  }
 }
// ]]>
</script>
</body>
</html>

参考:

http://www.duba.net/zt/flash/flashversion1.shtml

http://wenku.baidu.com/view/a989fe54ad02de80d4d840c2.html