let name = 111;
let a = {
name:222,
say:function(){
console.log(this.name);
}
};
let fn = a.say();
fn();
a.say();
let b = {
name:333,
say:function(fn){
fn();
}
}
b.say(a.say);
b.say = a.say;
b.say();
【js】判断this指向
最新推荐文章于 2024-08-16 19:02:09 发布