我用code在JS setTimeout函数是工作在Firefox; I,E也将被重新以秒为单位。但不工作的IE浏览器。 我改变了方法,POST,但不支持不要求那么它再次更改为GET。 任何解决方案?
函数getCallDetails(CID){
$阿贾克斯({
网址:'?callInfo.html CID ='+ CID,
方法:GET,
数据类型:JSON,
成功:功能(数据){
callResult = data.rows;
showCallDetails(callResult,CID);
},
失败:功能(形式,动作){
}
});
window.setTimeout(getCallDetails,1000,[CID]);
}
解决方案
尝试:
window.setTimeout(函数(){ getCallDetails(CID); },1000);
希望它可以帮助
I used the code in js setTimeout function it is working in firefox ;i,e it is reloaded with in seconds. but not working in IE. I changed the method as 'POST', but not request not supported then it changed again in to 'GET'. Any solution ?
function getCallDetails(cId){
$.ajax( {
url : 'callInfo.html?cId='+cId,
method : "GET",
dataType: "json",
success : function(data) {
callResult=data.rows;
showCallDetails(callResult,cId);
},
failure : function(form, action) {
}
});
window.setTimeout(getCallDetails, 1000,[cId]);
}
解决方案
Try:
window.setTimeout(function() { getCallDetails(cId); }, 1000);
Hope it helps