function getAge() { var y = new Date().getFullYear(); console.log(y - this.birth); } var xiaoming = { name: '小明', birth: 1990, age: getAge f:function(){ console.log("fffff") } }; xiaoming.age(); // 25 getAge.apply(xiaoming, []); // 25, this指向xiaoming, 参数为空 xiaoming.getAge() //xiaoming.f.apply(null,[])