当前位置:网站首页>27. this指向问题
27. this指向问题
2022-06-11 19:54:00 【Suyuoa】
如果直接console.log(this),会返回window
![]()

把console.log(this)搞在函数中,直接调用函数this也指向window

![]()
把test()当做回调函数给定时器,也是指向window

![]()
放在对象中会指向对象

![]()
搞在一个事件中会指向触发事件的对象
![]()
![]()
构造函数中指向被构造出来的实例


边栏推荐
- Raki's notes on reading paper: learning fast, learning slow: a general continuous learning method
- Implementation of SQL online editor based on Vue + codemirror
- RTL仲裁器设计
- Yolov3 pytoch code and principle analysis (II): network structure and loss calculation
- 电源防反接和防倒灌 - 使用MOS 管和运放实现理想二极管
- Loop filtering to uncover the technical principle behind video thousand fold compression
- "Video version Mae" of hekaiming team, efficient video pre training! The effect is also very good when mask ratio is up to 90
- Flutter doctor 顯示xcode沒有安裝的解决辦法
- Anaconda安装、Jupyter Notebook默认启动路径修改及Nbextensions插件安装
- 导师转我800块,让我仿真一个电路(电源设计)
猜你喜欢

30讲 线性代数第二讲 矩阵

Detailed tutorial on installing MySQL database in Linux environment (including uninstallation and password reset process)

巴比特 | 元宇宙每日必读:数字藏品二级市场乱象丛生,00后成新韭菜,监管迫在眉睫?...

In 2021, the global barite product revenue was about $571.3 million, and it is expected to reach $710.2 million in 2028

Summary 111111111111111111111

Flutter doctor shows the solution that Xcode is not installed

Leetcode 1992. 找到所有的农场组(可以,一次过)

WR | 西湖大学鞠峰组微纳塑料污染对人工湿地菌群与脱氮功能的影响

RTL arbiter design

556. 下一个更大元素 III-(31. 下一个排列)-两次遍历
随机推荐
Golang learning notes - Basics
Qubicle notes: Hello voxel
iMeta | 南科大夏雨组纳米孔测序揭示微生物可减轻高海拔冻土温室气体排放
Three common sense that managers must know
In 2021, the global revenue of flexible fireproof sealant is about 755.2 million dollars, and it is expected to reach 1211.7 million dollars in 2028
Database introduction
These postgraduate entrance examination majors are easy to be confused. If you make a mistake, you will take the exam in vain!
【求助】請問如何讓微信公眾號文章在外部瀏覽器中打開後還能顯示下方的精選留言?
Chrome tips - browser web page setting coding, solving the problem of web page garbled code, obtaining the latest version of charset plug-in, UTF-8 coding setting
C#深拷贝
AHB_Bus_Matrix_3x3 设计
Qubicle notes: self set shortcut keys (attached with Lao Wang's self set shortcut key file)
Image transformation torchvision Transforms notes
Proficient in xmake
The first bullet of comparative learning
激活函数公式、导数、图像笔记
dried food! Information diffusion prediction based on sequence hypergraph neural network
Flutter Doctor affiche les solutions que xcode n'a pas installées
Comp3411 -prolog language
LNMP架构源码编译安装图文讲解(附带搭建论坛实验)