一、在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) {} }; };