开发者

Javascript JSONP callback function is method of object?

function handler1(data) { }
function objectA {
  this.handler2 = function(data) { }
}

I can call JSONP page and receive data with handler1 function. But I need to use OOP. How can I c开发者_StackOverflowall JSONP page and receive data with objectA.handler2 function?


in the same way, - objectA_instance.handler2( data ). Nothing fancy.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜