function Person(){
this.name = "name";
this.Mediator = {
sayName : function(){
//如何获取Person中的name
}
}
}
var p = new Person();
p.Mediator.sayName();
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
楼上是一种方法,
bind也可以: