我有一个网站,计算每个服务器的性能。其中一个要求是关于性能的中心部分页面必须先完成加载,然后再在后台执行另一个功能。
这个居中的部分页面使用ajax调用。它们在js文件的document.ready中定义:
$(document).ready(function () {
// ajax call here
// another ajax call here
// third ajax call here
});
然后,在文档中的函数就绪后,我想要执行的函数:
function functionA() {
// some codes here
});
我试着使用这个:
$.when(docume