function Aaa(){ this.a = 12; setInterval(this.show,1000);}Aaa.prototype.show = function(){ console.log(this.a);}var a = new Aaa(); 按照理解window里沒(méi)有show的方法,結(jié)果打印出來(lái)的是a對(duì)象,理解不了,求大神指點(diǎn)
setInterval里面this指向的是window,下面的函數(shù)怎么理解
慕尼黑的夜晚無(wú)繁華
2018-09-11 17:08:42