this的指向有哪些??? h哈哈 2022-04-04 142 阅读1分钟 普通函数中的this指向window 定时器中的this指向window 箭头函数没有this,它的this指向取决于外部环境 事件中的this指向事件的调用者 构造函数中this和原型对象中的this,都是指向构造函数new 出来实例对象 类 class中的this 指向由constructor构造器new出来的实例对象 自调用函数中的this 指向window