首页 > 代码库 > js判断是否安装flash

js判断是否安装flash

    <script type="text/javascript">        (function () {            var noFlash = "你的浏览器没有安装Flash,会影响视频查看和上传图片...";            var isIE = !-[1, ];            if (isIE) {                try {                    var swf1 = new ActiveXObject(ShockwaveFlash.ShockwaveFlash);                    //alert(‘安装了Flash‘);                }                catch (e) {                    alert(noFlash);                }            }            else {                try {                    var swf2 = navigator.plugins[Shockwave Flash];                    if (swf2 == undefined) {                        alert(noFlash);                    }                    else {                        //alert(‘安装了Flash‘);                    }                }                catch (e) {                    alert(noFlash);                }            }        })();    </script>

 

js判断是否安装flash