举个例子,用jQuery
$('#test').on('click', ()=>{
console.log(this) // window
});
那我要怎么获取外部和内部的this?除了将箭头函数换成原来的function就没有其他方法了吗?
慕妹3146593
相关分类