简体   繁体   English

成功事件未触发

[英]Success Event does not Fired

$.ajax('http://blog.yahoo.com/@apac3/ajax/getComment?ugcId=68197&commentCount=30&ownerGuid=IQDTYHIWBYN4PPB6DXQWU7JWN4&page=2&type=blog&.crumb=UxHpRaVVUMo&jsoncallback=?', {
        type: "GET",
        crossDomain:true, 
        async: false, 
        dataType: "jsonp",
        success: function(comment){
            alert("myObject is " + comment.toSource());
        }
    });

I can see some callback is in chrome's console, however, there is some errors that making success event cannot function normally. 我可以看到chrome的控制台中存在一些回调,但是,存在一些使成功事件无法正常运行的错误。

Does anyone know how to obtain the values in the callback? 有谁知道如何获取回调中的值?

Your biggest issue is that comment is probably not an instance of a class but is either a string or is a basic JSON object. 您最大的问题是注释可能不是类的实例,而是字符串或基本JSON对象。 Unless you have some library which will change the way that Strings or JSON work by modifying the prototypes. 除非您有一些可以通过修改原型来更改String或JSON工作方式的库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM