Ajax请求被取消导致iframe重新加载

时间:2018-07-11 09:29:45

标签: javascript ajax iframe

代码示例:

SaveEntity().then(
function () {       
    //Reachable code
    top.CompletingTimeout = setTimeout(function() {
        //Unreachable code because of refresh current iframe by SaveEntity logic
        top.CompleteFunction();
    }, 10000);
});

相反,setTimeout可以用于异步Ajax请求,该请求将被取消。

我可以防止在重新加载iframe时卸载此脚本吗? 代码可访问?

0 个答案:

没有答案
相关问题