Jquery的属性选择器
2010-02-25 19:53 AnyKoro 阅读(213) 评论(0) 收藏 举报Attribute Filters:Note: In jQuery 1.3 [@attr] style selectors were removed (they were previously deprecated in jQuery 1.2). Simply remove the '@' symbol from your selectors in order to make them work again.
| Name | Type | 
|---|---|
| [attribute] | Returns: Array<Element(s)> | 
| Matches elements that have the specified attribute. Note the "@" before the attribute name was deprecated as of version 1.2. | |
| [attribute=value] | Returns: Array<Element(s)> | 
| Matches elements that have the specified attribute with a certain value. | |
| [attribute!=value] | Returns: Array<Element(s)> | 
| Matches elements that either don't have the specified attribute or do have the specified attribute but not with a certain value. | |
| [attribute^=value] | Returns: Array<Element(s)> | 
| Matches elements that have the specified attribute and it starts with a certain value. | |
| [attribute$=value] | Returns: Array<Element(s)> | 
| Matches elements that have the specified attribute and it ends with a certain value. | |
| [attribute*=value] | Returns: Array<Element(s)> | 
| Matches elements that have the specified attribute and it contains a certain value. | |
| [attributeFilter1][attributeFilter2][attributeFilterN] | Returns: Array<Element(s)> | 
| Matches elements that match all of the specified attribute filters. | |
作者:AnyKoro
    
    本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。 
 
                    
                     
                    
                 
                    
                 
                
            
         浙公网安备 33010602011771号
浙公网安备 33010602011771号