您的位置:首页 > Web前端 > JQuery

Jquery $("input:checkbox[name='xxx']:checked)的含义

2016-08-23 09:49 441 查看

Jquery $(“input:checkbox[name=’xxx’]:checked)的含义

:checkbox
是一个jquery extension selector,不属于css的方法,无法利用dom本身的作用.


有以下几种:

selectorfunction
:animated SelectorSelect 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 SelectorSelects all button elements and elements of type button.
:checkbox SelectorSelects all elements of type checkbox.
:eq() SelectorSelect the element at index n within the matched set.
:even SelectorSelects even elements, zero-indexed. See also odd.
:file SelectorSelects all elements of type file.
:first SelectorSelects the first matched DOM element.
:gt() SelectorSelect all elements at an index greater than index within the matched set.
:has() SelectorSelects elements which contain at least one element that matches the specified selector.
:header SelectorSelects all elements that are headers, like h1, h2, h3 and so on.
::hidden SelectorSelects all elements that are hidden.
:image SelectorSelects all elements of type image.
:input SelectorSelects all input, textarea, select and button elements.
:last SelectorSelects the last matched element.
:lt() SelectorSelect all elements at an index less than index within the matched set.
:parent SelectorSelect all elements that have at least one child node (either an element or text).
:password SelectorSelects all elements of type password.
:radio SelectorSelects all elements of type radio.
:reset SelectorSelects all elements of type reset.
:selected SelectorSelects all elements that are selected.
:submit SelectorSelects all elements of type submit.
:text SelectorSelects all input elements of type text.
:visible SelectorSelects all elements that are visible.
:odd SelectorSelects odd elements, zero-indexed.
:checked
是一个jquery form selector。


拥有以下几个选择器:

Selectorfunction
:button SelectorSelects all button elements and elements of type button.
:checkbox SelectorSelects all elements of type checkbox.
:checked SelectorMatches all elements that are checked or selected.
:disabled SelectorSelects all elements that are disabled.
:enabled SelectorSelects all elements that are enabled.
:file SelectorSelects all elements of type file.
:focus SelectorSelects element if it is currently focused.
:image SelectorSelects all elements of type image.
:input SelectorSelects all input, textarea, select and button elements.
:password SelectorSelects all elements of type password.
:radio SelectorSelects all elements of type radio.
:reset SelectorSelects all elements of type reset.
:selected SelectorSelects all elements that are selected.
:submit SelectorSelects all elements of type submit.
:text SelectorSelects all input elements of type text.
Note:

:fist, :last, :checked还是比较有用的,但是这个分类也不是很准,选择器有的属于两个类别或多个类别,有一点乱
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: