My code goes like this.
10条回答 离开以前 (楼主) 2021-02-04 05:48 Count img inside #some_div: $("#some_id img").length If you want only the direct children, not all descendants: $("#some_id > img").length 0 讨论(0) 查看其它10个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复
Count img inside #some_div:
$("#some_id img").length
If you want only the direct children, not all descendants:
$("#some_id > img").length