JavaScript this

var name = "555"; var obj = { name:"666", fun:{ name : "777", a : function(){ console.log(this.name); } } } console.log(obj.fun.a()) var f = obj.fun.a; console.log(f()); 返回:777,555,方法a被f
相關文章
相關標籤/搜索