看了这里说的:https://www.cnblogs.com/LLLLLLL/p/5345627.html
起因:升级了IE11之后部分页面刷新时会出现"SCRIPT5007: 缺少对象 "的报错,查看之后发现是Uploadify目前不支持IE11。
每次打开页面就报错,IE11上传后不能继续执行其他js,除了IE11都可以。
以下操作并没有解决我的问题:
在页面头部添加<meta http-equiv="X-UA-Compatible" content="IE=edge" >
通过在meta中设置X-UA-Compatible的值,指定IE8/9及以后的版本都会以最高版本IE来渲染页面。
我参考的修改源码方法:
//原来的代码是
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") {
f[h] = null;
}
} catch(e) {}
}
}
} catch(g) {}
window.__flash__removeCallback = function(c, b) {
try {
if (c) {
c[b] = null;
}
} catch(a) {}
};
};
修改后
//新代码
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) {}
};
};
改了源码终于解决了。