1:children及find方法都用是用来获得element的子elements的,两者都不会返回 text node,就像大多数的jQuery方法一样。
2:children方法获得的仅仅是元素一下级的子元素,即:immediate children。
3:find方法获得所有下级元素,即:descendants of these elements in the DOM tree
4:children方法的参数selector 是可选的(optionally),用来过滤子元素,但find方法的参数selector方法是必选的。
5:find方法事实上可以通过使用 jQuery( selector, context )来实现:英语如是说:Selector context is
implemented with the .find() method; therefore, $('li.item-ii').find('li') is
equivalent to $('li', 'li.item-ii').
相关文章
- 32.768kHz晶振详解:作用、特性及与其他晶振的区别
- JDK 17和JDK 8及Spring Boot 2和Spring Boot 3的区别:
- viewDidLoad, viewWillDisappear, viewWillAppear等区别及各自的加载顺序
- C#中的WinForm的消息机制简述,及消息机制下Invoke,和BeginInvoke的使用和区别
- Python中模块及和requests的使用区别
- 使用jquery获取url及url参数的方法
- Hive中管理表(内部表)和外部表的区别是什么,及分区表使用场景
- Spring Boot 和 Spring Cloud 的区别及选型
- vue3中defineComponent和defineAsyncComponent的区别及使用场景
- SMBus、I2C 和 PMBus 协议的区别及联系