开发者

jQuery: "Doesn't have" selector?

开发者 https://www.devze.com 2023-02-05 09:46 出处:网络
I see this has selector, where\'s the hasnt selector? I want to开发者_如何学Go find tables that don\'t contain images.Something like $(\"table:not(:has(img))\")?Take a look at not(). Then you can say:

I see this has selector, where's the hasnt selector? I want to开发者_如何学Go find tables that don't contain images.


Something like $("table:not(:has(img))")?


Take a look at not(). Then you can say:

$('selection').not('something-you-don\'t-want')


Try the .not() method or the :not() selector.

0

精彩评论

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