JavaScript設計模式筆記

第二章 this call apply 1、this的指向     常規用法: 作爲對象的方法調用 當函數作爲對象的方法被調用時,this指向該對象                                  let obj = {     a: 1,     getA: function () {             alert(this == obj);//輸出true       
相關文章
相關標籤/搜索