首页 > 其他分享 >Uncaught TypeError: this.XXXXX is not a function

Uncaught TypeError: this.XXXXX is not a function

时间:2022-10-11 16:59:12浏览次数:45  
标签:function TypeError var Uncaught 平级 XXXXX

image
看看你调用方法是不是不和这句话在一个函数方法里,

A(){
    a(){
		this.B
	}
}
B(){

}

B与A是平级的,不能直接在a中用this,a中的this指向A
所以

A(){
	var that = this
    a(){
		that.B
	}
}
B(){

}

标签:function,TypeError,var,Uncaught,平级,XXXXX
From: https://www.cnblogs.com/java-six/p/16779737.html

相关文章