var flashchecker = function () {var hasflash = 0; Whether flash var flashversion = 0 is installed; Flash version if (document.all) {var swf = new ActiveXObject (' Shockwaveflash.shockwaveflash '); if (swf) {hasflash = 1; vswf = swf. GetVariable ("$version"); Flashversion = parseint (Vswf.split ("") [1].split (",") [0]);}} else {if (navigator.plugins && navigator.plugins.length > 0) {var swf = navigator.plugins["Shockwave Flash"]; if (swf) {hasflash = 1; var words = Swf.description.split (""); for (var i = 0; i < words.length; ++i) {if (IsNaN (parseint (words[i))) continue; flashversion = parseint (Words[i]);}} }} return {f:hasflash, v:flashversion}; }
var FLs = Flashchecker (); var s = ""; if (!FLS.F) {if (Confirm ("Your browser does not have a Flash plugin installed, now installed?") ") {window.location.href =" http://get.adobe.com/cn/flashplayer/";}}
JS to determine if the browser installs Flash plugin, and prompts to install or open