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

后端 未结 3 433
無奈伤痛
無奈伤痛 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:00

    Try this

    $('a[b="345"],a[a=123] ')
    

    See the jQuery Multiple selector docs.

提交回复
热议问题