jQuery源码解析(1)
来源:互联网 发布:ubuntu ntp服务器设置 编辑:程序博客网 时间:2024/06/11 11:33
JQuery文件的开头代码:
!function(d, c) {"object" == typeof module && "object" == typeof module.exports ? module.exports = d.document ? c(d, !0) : function(b) {if (!b.document) {throw new Error("jQuery requires a window with a document")}return c(b)} : c(d)}("undefined" != typeof window ? window : this, function(a, b) {。。。。。。。});
以上一段代码是自执行代码结构,等价于:
function AAAA(a, b) { "object" == typeof module && "object" == typeof module.exports ? module.exports = a.document ? b(a, !0) : function(a) { if (!a.document) throw new Error("jQuery requires a window with a document"); return b(a) }: b(a)} function BBB(a, b) {。。。}var paramA="undefined" != typeof window ? window: this;AAAA(paramA,BBB);
阅读全文
0 0
- jQuery源码解析(1)
- jquery源码解析1
- jQuery源码解析1(Utilities)
- jQuery源码解析1(Utilities)
- jQuery深入之源码解析(一)
- jQuery 源码解析笔记(一)
- JQuery validation源码解析
- jquery源码解析
- jquery源码解析
- jquery源码解析资料
- jQuery.extend()源码解析
- jQuery 源码解析(一)
- 浅谈jquery源码解析
- jQuery源码解析data
- 关于JQuery源码解析
- jquery.parser源码解析
- jquery源码解析
- jQuery.lazyload源码解析
- NYOJ:72-Financial Management
- 个人去办理上沪c流程
- Linux解决bash: mysql: command not found 的方法
- java基础--集合
- UVA 12096 The SetStack Computer 题解
- jQuery源码解析(1)
- 机器学习
- Openstack网络配置--命令行篇
- java基础--泛型
- 递归-斐波纳挈数列(不死神兔)
- Mybatis的全局配置文件
- 构建Web应用
- ValueError: invalid literal for int() with base 10: 'largeDoses'
- NYOJ:73-比大小