开发者

Javascript JSONP callback function is method of object?

开发者 https://www.devze.com 2023-04-09 12:22 出处:网络
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开发者_StackOverf
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

精彩评论

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

关注公众号