从对象返回变量

I need to return result variable from this code, I am trying it about hour, but still with no successs... Can You help me please? I studied object too, but without success...

api.prototype.ajax = function()
{
    marmottajax({
                            url: "http://localhost:8080/bp/stranka/api/test",
                            method: "post",
                            parameters: 
                            {
                                image: 8,
                                by: "click"
                            }
                        }).then(function(result) 
                        {
                            result; //this variable i want to get/return to my function
                        });
}
查看全部
weixin_33729196
weixin_33729196
2015/09/23 15:22
  • variables
  • ajax
  • return
  • object
  • 点赞
  • 收藏
  • 回答
    私信

2个回复