Jquery $(“input:checkbox[name=’xxx’]:checked)的含义
:checkbox
是一个jquery extension selector,不属于css的方法,无法利用dom本身的作用.
有以下几种:
selector | function |
---|---|
:animated Selector | Select all elements that are in the progress of an animation at the time the selector is run. |
:Attribute Not Equal Selector [name!=”value”] | Select elements that either don’t have the specified attribute, or do have the specified attribute but not with a certain value. |
:button Selector | Selects all button elements and elements of type button. |
:checkbox Selector | Selects all elements of type checkbox. |
:eq() Selector | Select the element at index n within the matched set. |
:even Selector | Selects even elements, zero-indexed. See also odd. |
:file Selector | Selects all elements of type file. |
:first Selector | Selects the first matched DOM element. |
:gt() Selector | Select all elements at an index greater than index within the matched set. |
:has() Selector | Selects elements which contain at least one element that matches the specified selector. |
:header Selector | Selects all elements that are headers, like h1, h2, h3 and so on. |
::hidden Selector | Selects all elements that are hidden. |
:image Selector | Selects all elements of type image. |
:input Selector | Selects all input, textarea, select and button elements. |
:last Selector | Selects the last matched element. |
:lt() Selector | Select all elements at an index less than index within the matched set. |
:parent Selector | Select all elements that have at least one child node (either an element or text). |
:password Selector | Selects all elements of type password. |
:radio Selector | Selects all elements of type radio. |
:reset Selector | Selects all elements of type reset. |
:selected Selector | Selects all elements that are selected. |
:submit Selector | Selects all elements of type submit. |
:text Selector | Selects all input elements of type text. |
:visible Selector | Selects all elements that are visible. |
:odd Selector | Selects odd elements, zero-indexed. |
:checked
是一个jquery form selector。
拥有以下几个选择器:
Selector | function |
---|---|
:button Selector | Selects all button elements and elements of type button. |
:checkbox Selector | Selects all elements of type checkbox. |
:checked Selector | Matches all elements that are checked or selected. |
:disabled Selector | Selects all elements that are disabled. |
:enabled Selector | Selects all elements that are enabled. |
:file Selector | Selects all elements of type file. |
:focus Selector | Selects element if it is currently focused. |
:image Selector | Selects all elements of type image. |
:input Selector | Selects all input, textarea, select and button elements. |
:password Selector | Selects all elements of type password. |
:radio Selector | Selects all elements of type radio. |
:reset Selector | Selects all elements of type reset. |
:selected Selector | Selects all elements that are selected. |
:submit Selector | Selects all elements of type submit. |
:text Selector | Selects all input elements of type text. |
Note:
:fist, :last, :checked还是比较有用的,但是这个分类也不是很准,选择器有的属于两个类别或多个类别,有一点乱