我有一个自调用功能。
var controller = new (function () {
this.func = function {
};
});
这个 get 在第一页上执行,我想访问另一个页面中的函数。我如何单独访问该方法...
最佳答案
var controller = new (function _controller() {
this.func = function {
};
});
var otherController = new _controller();
关于javascript - 是否可以在某个地方调用自调用函数方法?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6385220/