当我拨打这个电话时,我该怎么做?
client.notification("test", "test", function(){
alert("Hello world");
});
我可以在" client.notification"中调用function(){....}内的东西?
离。
var client = ({"notification" : function(a,b,c){
document.write(a + b);
if ( .... ) {
//call the alert stuff from the function "c"
}
});
我试过这个:
$('#notification').click(eval(c));
没有运气
答案 0 :(得分:0)
试试这个:
var client = ({"notification" : function(a,b,c){
alert('inside of notification');
c.call(); // or even `c()`
}});
client.notification("test", "test", function(){
alert("inside of callback");
});