草庐IT

forCustomerList

全部标签

javascript - Ajax 请求。哪个回调先执行完成或成功?

我可以点击它来找出答案,但我将使用SO。在我的单元测试(qunit)中,我使用asynchShould(asynchTest的别名)测试。断言的一部分是等待请求的完成/成功。像这样:asyncShould('talktocustomerlistserver',1,function(){stop(2000);varforCustomerList=newCustomerListRequest();forCustomerList.page='helpers/helper.php';forCustomerList.data+='&action=customerListServer&DB=110