jQuery - How to match an element has attribute a or attribute b

后端 未结 3 439
無奈伤痛
無奈伤痛 2021-01-20 23:58

How to write a jquery selector to match an element has attribute a or attribute b. It must match three elements below


<         


        
3条回答
  •  一向
    一向 (楼主)
    2021-01-21 01:02

    Or generally for mere presence of attribute

    $("a[a], a[b]")
    

提交回复
热议问题