swfupload在IE10(9)下不显示上传按钮的解决办法

打开swfupload.js把

// Flash Satay object syntax: http://www.alistapart.com/articles/flashsatay和

// Private: getFlashVars builds the parameter string that will be passed中间的内容替换为

var classid = "";
    var Sys = {};
    var ua = navigator.userAgent.toLowerCase();
    if (window.ActiveXObject)
{        
   Sys.ie = ua.match(/msie ([\d.]+)/)[1];
    if (Sys.ie && Sys.ie.substring(0, 1) == "9" || Sys.ie.substring(0, 2) == "10")
    {
        classid = ' classid = "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"';
    }
}
    return ['<object', classid, ' id="', this.movieName, '" type="application/x-shockwave-flash" data="', (this.support.imageResize ? this.settings.flash_url : this.settings.flash9_url), '" width="', this.settings.button_width, '" height="', this.settings.button_height, '" class="swfupload">',
                '<param name="wmode" value="', this.settings.button_window_mode, '" />',
                '<param name="movie" value="', (this.support.imageResize ? this.settings.flash_url : this.settings.flash9_url), '" />',
                '<param name="quality" value="high" />',
                '<param name="allowScriptAccess" value="always" />',
                '<param name="flashvars" value="' + this.getFlashVars() + '" />',
                '</object>'].join("");
};

以上内容基于http://xuzhihong1987.blog.163.com/blog/static/26731587201221355044102/进行的修改。

 

'<param name="wmode" value="', this.settings.button_window_mode, '" />',设置成value=‘transparent’ 可解决在IE10下 iframe框架tab页中 flash按钮一直处于最顶层的问题。

你可能感兴趣的:(swfupload在IE10(9)下不显示上传按钮的解决办法)