• UpLoadify在IE下兼容问题


    一、在IE9、IE10不能点击的问题解决

    解决方法:进入uploadify的js文件中,搜索SWFUpload.prototype.getFlashHTML,找到它对应的语句,将方法全部替换为以下内容:

        SWFUpload.prototype.getFlashHTML = function () {  
            // Flash Satay object syntax: http://www.alistapart.com/articles/flashsatay  
            var obj = ['<object id="', this.movieName, '" type="application/x-shockwave-flash" data="', this.settings.flash_url, '" width="', this.settings.button_width, '" height="', this.settings.button_height, '" class="swfupload">'].join(""),  
        params = [  
        '<param name="wmode" value="', this.settings.button_window_mode, '" />',  
        '<param name="movie" value="', this.settings.flash_url, '" />',  
        '<param name="quality" value="high" />',  
        '<param name="menu" value="false" />',  
        '<param name="allowScriptAccess" value="always" />',  
        '<param name="flashvars" value="', this.getFlashVars(), '" />'  
        ].join("");  
            if (navigator.userAgent.search(/MSIE/) > -1) {  
                obj = ['<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="', this.movieName, '" width="', this.settings.button_width, '" height="', this.settings.button_height, '" class="swfupload">'].join("");  
                params += '<param name="src" value="' + this.settings.flash_url + '" />';  
            }  
            return [obj, params, '</object>'].join("");  
        };  

    二丶jQuery运行时错误:“没有对象”

    解决方法:进入uploadify的js文件中,搜索SWFUpload.prototype.cleanUp ,找到它对应的语句,在方法中对应的位置添加红色部分内容:

        SWFUpload.prototype.cleanUp = function(f) {
            try {
                if (this.movieElement && typeof(f.CallFunction) === "unknown") {
                    this.debug("Removing Flash functions hooks (this should only run in IE and should prevent memory leaks)");
                    for (var h in f) {
                        try {
                            if (typeof(f[h]) === "function" && h[0] >= 'A' && h[0] <= 'Z') {
                                f[h] = null;
                            }
                        } catch(e) {
        }
                    }
                }
            } catch(g) {
        }
            window.__flash__removeCallback = function(c, b) {
                try {
                    if (c) {
                        c[b] = null;
                    }
                } catch(a) {}
            };
        };
    作者:chenze
    出处:https://www.cnblogs.com/chenze-Index/
    本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
    如果文中有什么错误,欢迎指出。以免更多的人被误导。
  • 相关阅读:
    BT5启动SSH服务
    RIP路由协议的水平分割和触发更新
    FATFS Copy Files
    spi master vhd
    altera cpld spi master verilog
    SPI bus master for System09
    How To Set a Status Flag in One Clock Domain, Clear It in Another
    VHDL 整数 小数 分数 分频
    vhdl 状态机
    The DualModulus Divider in VHDL
  • 原文地址:https://www.cnblogs.com/chenze-Index/p/9519038.html
Copyright © 2020-2023  润新知