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.
精彩评论