开发者

jQuery selector for <div> which does not contain <img>?

开发者 https://www.devze.com 2022-12-26 07:47 出处:网络
How do I select all <div> elements which do not contain any 开发者_Go百科<img> elements using jQuery?$(\'div:not(:has(img))\')

How do I select all <div> elements which do not contain any 开发者_Go百科<img> elements using jQuery?


$('div:not(:has(img))')


$(".className").not(":has(img)")
0

精彩评论

暂无评论...
验证码 换一张
取 消