:hidden
匹配所有的不可见元素,input 元素的 type 属性为 "hidden" 的话也会被匹配到
Matches all elements that are hidden, or input elements of type "hidden".
返回值

Array<Element>
示例

查找所有不可见的 tr 元素

HTML 代码:
<table>
<tr style="display:none"><td>Value 1</td></tr>
<tr><td>Value 2</td></tr>
</table>

jQuery 代码:
$("tr:hidden")

结果:
[ <tr style="display:none"><td>Value 1</td></tr> ]

---------------------------------------------------------------------------------------
:visible
匹配所有的可见元素
Matches all elements that are visible.
返回值

Array<Element>
示例

查找所有可见的 tr 元素

HTML 代码:
<table>
<tr style="display:none"><td>Value 1</td></tr>
<tr><td>Value 2</td></tr>
</table>

jQuery 代码:
$("tr:visible")

结果:
[ <tr><td>Value 2</td></tr> ]

---------------------------------------------------------------------------------------
[attribute]
匹配包含给定属性的元素
Matches elements that have the specified attribute.
返回值

Array<Element>
参数

attribute (String) : 属性名
示例

查找所有含有 id 属性的 div 元素

HTML 代码:
<div>
<p>Hello!</p>
</div>
<div /> ]

 

http://www.lzgame.com/zblog/archives/cat_1/2011/04/17.html

http://www.css88.com/jqapi-1.9/checkbox-selector/

相关文章:

  • 2021-08-02
  • 2021-10-14
  • 2021-11-22
  • 2021-04-17
  • 2021-08-09
  • 2022-12-23
猜你喜欢
  • 2021-12-10
  • 2021-11-22
  • 2022-12-23
  • 2022-12-23
  • 2021-07-28
  • 2021-09-09
相关资源
相似解决方案