js this,call,apply,bind

js中 this,call,apply,bind 总结 全局作用域或者普通函数中 this 指向全局对象 window。 方法调用中谁调用 this 指向谁 在构造函数或者构造函数原型对象中 this 指向构造函数的实例 箭头函数中指向外层作用域的 this call()、apply()、bind() 都是用来重定义 this 这个对象的! 调用他们可以为函数指定this的执行,同时也可以传参。
相关文章
相关标签/搜索