当前位置:网站首页>this points to the problem
this points to the problem
2022-07-31 05:58:00 【hug the whirlpool】
The pointing of this cannot be determined when the function is defined. Only when the function is executed can it be determined who this points to. In general, the final pointing of this is the object that called it.
At this stage, let's take a look at a few this pointers
1. In the global scope or in ordinary functions, this points to the global object window (note that this in the timer points to window)
In the function of the first parameter of the timer method, this also points to the window object
2. In the method, whoever calls the method, this points to whom

3. This in the constructor points to the newly created instance

边栏推荐
- 2021美赛C题M奖思路
- [Cloud Native] What should I do if SQL (and stored procedures) run too slowly?
- Judgment of database in SQL injection
- [Cloud native] Ribbon is no longer used at the bottom layer of OpenFeign starting from the 2020.0.X version
- Year-end summary - the years are quiet~
- Error: Cannot find module ‘D:\Application\nodejs\node_modules\npm\bin\npm-cli.js‘
- What is an EVM Compatible Chain?
- cocos2d-x 实现跨平台的目录遍历
- Hyper-V新建虚拟机注意事项
- 数字孪生将成为进入“元宇宙”一项重要的途径
猜你喜欢

最新MySql安装教学,非常详细

对于输出点是时间戳的渗透测试方法(以Oracle数据库为例)

mac10.14中安装mysqldb

Android软件安全与逆向分析阅读笔记

永恒之蓝漏洞复现

【云原生】微服务Nacos的简单介绍与使用

MySQL-如何分库分表?一看就懂

Digital twins will be an important way to enter the "metaverse"

UiBot存在已打开的MicrosoftEdge浏览器,无法执行安装

GUCCI, LV and other luxury giant universe how to layout yuan, other brands should keep up with?
随机推荐
Error: Cannot find module ‘D:\Application\nodejs\node_modules\npm\bin\npm-cli.js‘
About integrating superset into your own project
Common JVM interview questions and answers
MySQL高级语句(一)
sqlmap injection tutorial common commands
安装Multisim出现 No software will be installed or removed解决方法
理解js运算符
First acquaintance with Flask
Understanding SSRF, this article is enough
NFT与数字藏品到底有何区别?
Access database query
The server time zone value ‘й‘ is unrecognized or represents more than one time zone
Getting to know regular expressions
360 加固 file path not exists.
Error: Cannot find module 'D:\Application\nodejs\node_modules\npm\bin\npm-cli.js'
cocos create EditBox 输入文字被刘海屏遮挡修改
On the side of Ali, tell me what are the application scenarios of message middleware you know?
Powershell中UTF-8环境中文乱码解决办法
【uiautomation】微信好友列表获取(存储到txt中)
Oracle数据库中的“limit”查询