起因:ie多次加载uploadify3.2版本这个组件的时候,出现了SCRIPT5007: 缺少对象.
From:http://blog.163.com/xiangfei209@126/blog/static/986956742013610942338/
方法:
源代码:
1 SWFUpload.prototype.cleanUp = function(a) { 2 try { 3 if (this.movieElement && typeof(a.CallFunction) === "unknown") { 4 this.debug("Removing Flash functions hooks (this should only run in IE and should prevent memory leaks)"); 5 for (var c in a) { 6 try { 7 if (typeof(a[c]) === "function") { 8 a[c] = null 9 } 10 } catch(b) {} 11 } 12 } 13 } catch(d) {} 14 window.__flash__removeCallback = function(e, f) { 15 try { 16 if (e) { 17 e[f] = null 18 } 19 } catch(g) {} 20 } 21 };
修正代码:
1 SWFUpload.prototype.cleanUp = function(f) { 2 try { 3 if (this.movieElement && typeof(f.CallFunction) === "unknown") { 4 this.debug("Removing Flash functions hooks (this should only run in IE and should prevent memory leaks)"); 5 for (var h in f) { 6 try { 7 if (typeof(f[h]) === "function" && h[0] >= 'A' && h[0] <= 'Z') { 8 f[h] = null; 9 } 10 } catch(e) { 11 12 } 13 } 14 } 15 } catch(g) { 16 17 } 18 19 window.__flash__removeCallback = function(c, b) { 20 try { 21 if (c) { 22 c[b] = null; 23 } 24 } catch(a) {} 25 }; 26 };