文字
分享

返回值:Array<Element(s)>:not(selector)

概述

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

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

参数

selectorSelectorV1.0

用于筛选的选择器

示例

描述:

查找所有未选中的 input 元素

HTML 代码:

1

2

<code><input name="apple" />

<input name="flower" checked="checked" /></code>

jQuery 代码:

1

<code>$("input:not(:checked)")</code>

结果:

1

<code>[ <input name="apple" /> ]</code>

上一篇::last下一篇::even