例1
var Reptile = function () {
var reptile = this;
this.showBla = function() {
alert(reptile.bla);
}
}
var turtle = new Reptile();
turtle.bla = whatever ;
turtle.showBla();
例2
var Reptile = function () {
this.showBla = function() {
alert(this.bla);
}
}
var turtle = new Reptile();
turtle.bla = whatever ;
turtle.showBla();
实例1 有时似乎把东西推倒在构造中直接界定“这”?