weixin_33695450 2014-08-04 06:00 采纳率: 0%
浏览 114

.done()jQuery无法正常工作

Im using the below code for a ajax call

var getRequest = $.ajax({
    type: 'GET',
    url: Url,
    async: false,
    dataType: "text",
    complete: function () {
        $('#loading').hide();
    }
});

the request is getting complete and data is also withdrawn after the data is recieved the following:

getRequest.done(function (dataDb) {
    if (dataDb) {
        alert('dataDb: ' + dataDb);

    }
});

getRequest.fail(function (jqXHR, textStatus, error) {
    alert('data error within getUsersRequest ' + textStatus + ' : ' + error);
});

I'm recieving a error that getRequest.done(function(dataDb) or getRequest.fail(function(jqXHR, textStatus, error) is not a function.

  • 写回答

3条回答 默认 最新

  • weixin_33738555 2014-08-04 06:05
    关注

    It is because your JQuery version is too old.

    You can use success if you are not willing to upgrade the latest version of JQuery.

    success: function(dataDb) {
    
        }
    
    评论

报告相同问题?

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器