完全弄懂js中的this指向

js 中的 this 指向十分重要,瞭解 js 中 this 指向是每個學習js的人必學的知識點,今天沒事,正好總結了 js 中 this 的常見用法,喜歡的能夠看看:jquery 1. 全局做用域或者普通函數中 this 指向全局對象 window。web //直接打印 console.log(this) //window //function聲明函數 function bar () {con
相關文章
相關標籤/搜索