function Flashchecker () { 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) document.write ("You have Flash installed, the current Flash version is:" + fls.v + ". X"); else document.write ("You do not have Flash installed");
A simple test, because their own computer has been equipped with flash, so testing is the reverse test.
Determine if Flash Player and current version of JS code are installed