如这个类:
function Foo() { this.Field1 = "aaa"; } Foo.prototype = { Start: function () { window.addEventListener('scroll', this._handler); }, _handler: function () { // 请问这里面怎么访问本实例的 Field1 字段, this.Field1显然是不行的 } }
请排除箭头函数等ES6方案,谢谢。
富国沪深
相关分类