当前位置:网站首页>Why can the anonymous functions of JQ access the methods inside
Why can the anonymous functions of JQ access the methods inside
2022-07-28 14:43:00 【Front cut zz】
1.jQuery All methods of are based on jQuery object ( namely $ ), Native js Objects are inaccessible . When you use jQuery Object time , It will take the one you choose DOM Object instantiates a jQuery object , And then call jQuery Method . then jQuery Then put your choice jQuery Methods translate into native DOM Method to execute . about jQuery, There is only one so-called overall situation : namely jQuery object ( Alias $), There are no other global variables or methods .
2.jQuery The last part of the source code , Write directly to window On , It becomes a global variable !
window.jQuery=window.$=jQuery;
Instantiation :
js in , The process of creating objects with classes is often called instantiation , Instantiating an object is the process of creating an object .“ class ” It is abstract. , There is no way to manipulate it or use its methods and properties , Only instantiate this class into an object , Before you can call its series of methods and properties ; therefore , Instantiating an object is the process from abstraction to concrete .
边栏推荐
- Excel VBA 开发过程中遇到的一些问题,解决方案,持续更新
- [leetcode] 1331. Array sequence number conversion
- 十、时间戳
- @Solution to DS ('slave') multi data source compatible transaction problem
- Redis-持久化
- unittest执行runTestCase提示<_io.TextIOWrapper name=‘<stderr>‘ mode=‘w‘ encoding=‘utf-8‘>解决方案
- Swiftui 4.0's new navigation system
- How to use the C language library function getchar ()
- 【LeetCode】 贴纸拼词(动态规划)
- 我正在使用中的博客创作工具
猜你喜欢

Analysis of thrift serialization protocol

2022 high altitude installation, maintenance, removal of examination question bank and online simulated examination

Summarize the knowledge points of the ten JVM modules. If you don't believe it, you still don't understand it
C # 7 methods to obtain the current path

基于 MinIO 对象存储保障 Rancher 数据

Langjing Technology (Trax China) "robot +ai" opens the era of Chinese retail meta universe
C# 获取当前路径7种方法

Bulk Rename Utility

树莓派基础 | 总结记录树莓派学习过程中的一些操作

Many "double first-class" universities have launched the research guarantee and prediction name!
随机推荐
C# 读取ini文件、键值对操作
2022 safety officer-a certificate operation certificate examination question bank simulated examination platform operation
Open source project - taier1.2 release, new workflow, tenant binding simplification and other functions
(function(global,factory){
Unittest executes runtestcase prompt <_ io. Textiowrapper name= '< stderr>' mode=W encoding=UTF-8 > solution
Excel VBA 开发过程中遇到的一些问题,解决方案,持续更新
C语言实现简单学生成绩管理系统的方法
Hcip day 11
[leetcode] sticker spelling (dynamic planning)
2022 melting welding and thermal cutting examination questions and online simulation examination
Hand in hand from 0 to a "Nuggets special attention" Google plug-in, 5000 words detailed vue3 responsive principle, the advantages, disadvantages and choices of several cache read-write schemes, flyin
AFNetworking速成教程
为 @CloudStorage 添加了类 @Published 的能力
ScottPlot入门教程:获取和显示鼠标处的数值
Detailed explanation of common commands of vim (VIM use tutorial)
HCIP第十二天
[ecmascript6] other new interface features
Store and guarantee rancher data based on Minio objects
Redis-配置文件讲解
面试官:ThreadLocal使用场景有哪些?内存泄露问题如何避免?