function Person(name){ this.name = name; } Person.prototype.each = function () { console.log('吃東西'); } var xiaoming = new Person('小明')實例對象的時候this指向Person構造函數;不是很明白this是怎么樣指向Person構造函數,this是一個對象,又不是實例的一個屬性怎么樣指向Perosn構造函數呢?大神們能不能給小弟畫一下圖說明一下;
this指向的問題;
三國紛爭
2018-08-14 10:10:07