Copy Code code as follows:
function Flashchecker () {
var hasflash = 0; Whether Flash is installed
var flashversion = 0; 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 installed Flash, the current Flash version is:" + fls.v + ". X");
else document.write ("You do not have Flash installed");