关于获取jquery对象的长度
2024-09-05 06:34:24
/*
17:10 2019/8/6
@author zhangxingshuo
jQuery:"write less, do more" homepage: https://jquery.com/
jquery-1.12.4.js-|
jquery-2.2.4.js--|- from jQuery CDN: https://code.jquery.com/
jquery-3.4.1.js--|
┌ ┬ ┐
├ ┼ ┤
└ ┴ ┘ search for "length" and "size()" in three files, the results are as follow:
1.12.4 2.2.4 3.4.1
length true true true
size() true true false for more details:
in jquery1.12.4
101-102行:
*/ // The default length of a jQuery object is 0
length: 0,
/*
10949-10952行:
*/
// The number of elements contained in the matched element set
jQuery.fn.size = function() {
return this.length;
};
/*
jquery2.2.4
101-102行:
*/ // The default length of a jQuery object is 0
length: 0,
/*
9755-9757行:
*/
size: function() {
return this.length;
} /*
jquery3.4.1中
166-167行:
*/
// The default length of a jQuery object is 0
length: 0,
最新文章
- LinqToDB 源码分析——处理表达式树
- 【读书笔记】2016.12.10 《构建高性能Web站点》
- url.py中的配置问题
- Silverlight打印注意事项
- [转] 小tips: 使用&;#x3000;等空格实现最小成本中文对齐 ---张鑫旭
- Android的BUG(一) - HTML 5 播放streaming video造成卡住的问题
- Linux 安装之U盘引导
- 五、pig学习
- C++学习的心路历程之心理障碍
- 一个想法照进现实-《IT连》创业项目:万事开头难
- 微信小程序入门
- 大话python面向对象
- 怎么知道我的laravel 是几版本的
- nodejs安装及故障解决
- linux内核中的C语言常规算法(前提:你的编译器要支持typeof和type)
- kali中的postgres怎么连接
- linux利用命令将一个盘上的所有复制到另一个盘上
- POJ1159
- 分享一个MAC下绕开百度网盘限速下载的方法,三步操作永久生效
- 奶牛易物小组 Alpha冲刺