摘要: 在设置定时器时,setInterval和setTimeout的回调函数中this的指向都是window。这是因为定时器方法是在window下定义的。 this.timeInterval = setInterval(function () { console.log(this); }, 1000); 阅读全文
posted @ 2021-01-18 11:27 '--' 阅读(198) 评论(0) 推荐(0)