:not(selector)

来源:互联网 发布:宣传单页制作软件 编辑:程序博客网 时间:2024/05/21 14:05

:not(selector)

概述

去除所有与给定选择器匹配的元素

在jQuery 1.3中,已经支持复杂选择器了(例如:not(div a) 和 :not(div,a))

参数

selectorSelectorV1.0

用于筛选的选择器

示例

描述:

查找所有未选中的 input 元素

HTML 代码:
<input name="apple" /><input name="flower" checked="checked" />
jQuery 代码:
$("input:not(:checked)")
结果:
[ <input name="apple" /> ]
0 0