返回值:Array<Element(s)> :not(selector)
概述
去除所有與給定選擇器匹配的元素
在jQuery 1.3中,已經支援複雜選擇器了(例如:not(div a) 和 :not(div,a))
參數
selector Selector V1.0
用於篩選的選擇器
示例
描述:
查詢所有未選中的 input 元素
HTML 程式碼:
<input name="apple" />
<input name="flower" checked="checked" />
jQuery 程式碼:
$("input:not(:checked)")
結果:
[ <input name="apple" /> ]