- 博客(1)
- 收藏
- 关注
原创 js中this的指向问题
在函数中直接使用 function get(content){ console.log(this.content) } get("你好") //等价于get.call(window, "你好") 函数作为对象的方法被调用(谁调用我,我就指向谁) var person = { name:"zhangsan" run:function(time){ console.log(`$(this.name) 在跑步,最多$(time)min就不行了`) ...
2021-07-05 16:17:09 81
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人