小编Sha*_*mar的帖子

获取TypeError:$ .ajax(...).done不是函数[Ajax,Jquery]

在我的Jquery中,我正在使用Ajax并获得低于错误的消息.

TypeError: $.ajax(...).done is not a function
[Break On This Error] ).success(function(response) {
Run Code Online (Sandbox Code Playgroud)

我厌倦了使用成功而不是完成.但仍然得到相同的消息.

TypeError: $.ajax(...).success is not a function
[Break On This Error] ).success(function(response) { 
Run Code Online (Sandbox Code Playgroud)

示例代码段如下:

$(document).ready(function () {
        alert('in get');
        $.ajax({
            data: {
                'contentId': contentId,
                'USER_ID': USER_ID,
                'actionType': 'GETRATING',
                'portletGuid': portletGuid
            },
            type: 'GET',
            url: ajaxRatingServlet,
            cache: false
        }).success(function (response) {
            getUserPreference(response);
        });
Run Code Online (Sandbox Code Playgroud)

javascript ajax jquery

8
推荐指数
1
解决办法
4万
查看次数

标签 统计

ajax ×1

javascript ×1

jquery ×1