【发布时间】:2012-12-06 16:45:04
【问题描述】:
我们使用 XMLHttpRequest 模拟对象来测试我们的 ExtJs 4.1 应用程序与 Jasmine。现在,一切都在 Chrome 和 Firefox 中完美运行,但 IE 版本 7 到 9 一如既往地出现问题。
onreadystatechange函数有错误,
如果readyState 是1 那么SCRIPT575(由于错误c00c023f 无法继续)
如果readyState 是2 那么SCRIPT10(所需数据尚不可用)
看到这个Jsfiddle(搜索“错误”跳转到行)
另外还有一个错误TypeError: Object expected。
我读过的内容:
我阅读了一些帖子,例如 this 和 that,但没有一个建议解决了这个问题。
注意:
在 Chrome 和 Firefox 中,所有请求仅返回 readyState 4,但在 IE readyState 中,值从 1 到 4 重复(?)。
Chrome & FF
readyState 4 => OK
readyState 4 => OK
readyState 4 => OK
readyState 4 => OK
readyState 4 => OK
...
IE:
readyState 1 => error
readyState 2 => error
readyState 3 => OK
readyState 4 => OK
readyState 1 => error
...
你能指导我如何解决这个问题吗?我不知道。
【问题讨论】: