Browse > Home » jQuery » jQuery选择器 – 表单过滤(Form Filters)

jQuery选择器 – 表单过滤(Form Filters)

七月 9th, 2009 Leave a comment

本文是jQuery选择器系列之表单过滤(Form Filters).

表单过滤(Form Filters)是jQuery文档中分出来的选择器中的最后一组,但这并不表示我们仅仅应用这些选择器就能够驰骋DOM海洋了,我们还需要学习后面的过滤器等等.

其包括以下几个选择器:

:enabled
用法: $(“input:enabled”) ;
说明: 匹配所有可用元素.意思是查找所有input中不带有disabled=”disabled”的input.不为disabled,当然就为enabled啦.

:disabled
用法: $(“input:enabled”) ;
说明: 匹配所有不可用元素.与上面的那个是相对应的.

:checked
用法: $(“input:checked”) ;
说明: 匹配所有选中的被选中元素(复选框、单选框等,不包括select中的option).这话说起来有些绕口.

:selected
用法: $(“select option:selected”) ;
说明: 匹配所有选中的option元素.

转载请注明: 出自 FlexHome
原文链接:http://flex.desizen.com/jquery-selectors-formfilters/

Related Posts

一条评论 »
  1. 开心凡人 (2009/12/20) Reply to this comment

    准备新的一周最后逛一逛,下周更冷了呵呵

Leave a Reply

emoticons