[attribute=value]属性选择器
语法:[attribute=value]
此属性选择器用户获取属性attribute值为value的所有元素,[]专用于属性选择器。
如:$("li[title=code]"),获取属性title值为one的li元素。
[attribute!=value]属性选择器
语法:[attribute!=value]
用于获取不包括attribute属性或包括attribute属性但值不等于value的元素。
[attribute*=value]属性选择器
语法:[attribute*=value]
用于获取属性值包含value的所有元素。
如:$("li[title*=c]"),获取所有title属性值包含c的li元素。