function People(name) { this.name = name; this.sayName = function () { console.log('my name is:' + this.name); } } People.prototype.walk = function () { console.log(this.name + ' is walking'); 這里面this指向的是誰?。?nbsp; } var p1 = new People('我們'); var p2 = new People('在這里');People.prototype.walk()不好意思,問題沒描述完全,這樣這個(gè)函數(shù)里面的this代表了什么
javascript里面this的問題
猛跑小豬
2019-03-12 17:19:56