1. Directly determine whether there is a flash plugin
var myFlash = (function(){ if(typeof window.ActiveXObject != "undefined"){ return new ActiveXObject("ShockwaveFlash.ShockwaveFlash"); }else{ return navigator.plugins['Shockwave Flash']; }})();chrome:
Edge browser canceled window.ActiveXObject, using navigator.plugins
Use window.ActiveXObject in other versions of IE, but an error will be reported:
The Automation server cannot create objects
The reason for this problem is that the scripts contained in the page cannot create the object correctly
Solution: Install the "MSXML 4.0 Service Pack 2 (Microsoft XML Core Services)" patch, you can download it on Microsoft's website (installation file: msxmlchs.msi), and the problem can be solved after installation.
Note: The occurrence of script debugging errors may also be related to the security level of IE. You can lower the security level of IE to solve this problem. You may also need "scrrun.dll" support. The specific method is: Start -> Run -> Run the following command "regsvr32 scrrun.dll".
2. Obtain the version number of flash
<script> (function(){ var getFlashVersion = function() { try { if(typeof window.ActiveXObject != 'undefined') { return parseInt((new ActiveXObject('ShockwaveFlash.ShockwaveFlash')).GetVariable("$version").split("" ")[1].split(",")[0], 10); }else{ return parseInt(navigator.plugins["Shockwave Flash"].description.split(' ')[2], 10); } } catch(e){ return 0; } }; console.log(getFlashVersion()); })(); </script>The simple way to determine whether the browser installs flash plug-in in the above article is all the content I share with you. I hope you can give you a reference and I hope you can support Wulin.com more.