js 判断当前浏览器的flash player 是否安装及版本
function DownLoadFlashPlayer(){ var swf; var flashVersion; if(jQuery.browser.msie){ swf = new ActiveXObject('ShockwaveFlash.ShockwaveFlash'); flashVersion=parseInt(swf.GetVariable("$version").split(" ")[1].split(",")[0]); } else{ swf=navigator.plugins["Shockwave Flash"]; if(swf){ var words=swf.description.split(" "); for(var i=0;i<words.length;i++){ if(isNaN(parseInt(words[i]))) continue; flashVersion=parseInt(words[i]); } } } if(!swf || flashVersion<12){ var pageHost = ((document.location.protocol == "https:") ? "https://" : "http://"); document.write("<a href='http://get.adobe.com/cn/flashplayer/download/'><img src='" + pageHost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a>" ); } }