zoukankan      html  css  js  c++  java
  • 检测浏览器是否安装FLASH插件

        var iFlash = null;
    var version = null;
    var isIE = navigator.userAgent.toLowerCase().indexOf("msie") != -1
    if(isIE){
    //for IE

    if (window.ActiveXObject) {
    var control = null;
    try {
    control = new ActiveXObject('ShockwaveFlash.ShockwaveFlash');
    } catch (e) {
    iFlash = false;
    }
    if (control) {
    iFlash = true;
    version = control.GetVariable('$version').substring(4);
    version = version.split(',');
    version = parseFloat(version[0] + '.' + version[1]);
    alert("FLASH版本号:"+version)
    }
    }
    }else{
    //for other
    if (navigator.plugins) {
    for (var i=0; i < navigator.plugins.length; i++) {
    if (navigator.plugins[i].name.toLowerCase().indexOf("shockwave flash") >= 0) {
    iFlash = true;
    version = navigator.plugins[i].description.substring(navigator.plugins[i].description.toLowerCase().lastIndexOf("Flash ") + 6, navigator.plugins[i].description.length);
    }
    }
    }
    }
    if(iFlash){
    alert(version)
    }else{
    alert("您的浏览器未安装FLASH插件");
    }
  • 相关阅读:
    Qt进程间通信
    reinterpret
    vs调试技巧
    利用QSystemSemaphore和QSharedMemory实现进程间通讯
    QLocalSocket
    QShareMemory
    qt动态库实现无边框窗体的消息处理 nativeEvent的使用
    BCB6常用快捷键
    1219个人总结
    冲刺二 12.6
  • 原文地址:https://www.cnblogs.com/SCOOL/p/2360228.html
Copyright © 2011-2022 走看看