IE使用Ajax请求后会有缓存,因此会因为请求路径及参数没有变化,不会发起第二遍请求,我的解决办法就是在请求路径上加个时间戳,如图:
代码:
var zch = document.getElementById('xzzch');
var timestamp=new Date().getTime();
Ext.Ajax.request({
url: "qqqq.aspx?time"+timestamp,
method: 'GET',
async: false,
success: function (res, opt) {
var jsonRet = Ext.util.JSON.decode(res);
debugger;
var result = jsonRet["success"];
if (!result) {
return false;
}
var str = jsonRet["data"];
zch.value = str;
}
})