JQuery中常用的过滤选择器
不多说了,直接看下表吧。
| 选择器 | 说明 |
| :animated | 所有处于动画中的元素 |
| :button | 所有按钮,包括input[type=button]、input[type=submit]、input[type=reset]和<button>标记 |
| :checkbox | 所有的复选框,等同于input[type=checkbox] |
| : contains(foo) | 选择所有包含了文本“foo”的元素 |
| :disabled | 页面中被禁用了的元素 |
| :enabled | 页面中没有被禁用的元素 |
| :file | 上传文件的元素,等同于input[type=file] |
| : header | 选中所有的标题元素,例如<h1><h2> |
| : hidden | 页面中被隐藏了的元素 |
| : image | 图片提交按钮,等同于input[type=image] |
| : input | 表单元素,包括<input>、<select>、<textarea>、<button> |
| : not(filter) | 反向选择 |
| :parent | 选择所有拥有子元素(包括文本)的元素,空元素被排除 |
| : password | 密码文本框,等同于input[type=password] |
| : radio | 单选按钮,等同于input[type=radio] |
| : reset | 重置按钮,包括input[type=reset]和button[type=reset] |
| : selected | 下拉菜单中被选中的项 |
| :submit | 提交按钮,包括input[type=submit]和button[type=submit] |
| : text | 文本输入框,等同于input[type=text] |
| :visible | 页面中的所有可见元素 |
浙公网安备 33010602011771号