有时候我们需要给标签添加属性,这时候使用jquery,查询非常方便。
< a flag ='price' condion ='500' ></ a >
一个属性查询
$( " a[flag=price] " ) // 查询flag=price的a
组合属性查询
$( ' a[condion=price][flag=expence] ' ) // 同样都返回jquery对象
如果大家还有好的方法,一起分享把。
posted on 2010-09-29 13:58 管宇 阅读( ...) 评论( ...) 编辑 收藏
转载于:https://www.cnblogs.com/winner2009/archive/2010/09/29/1838355.html