Combining a class selector and an attribute selector with jQuery

后端 未结 4 969
轻奢々
轻奢々 2020-12-12 14:56

Is it possible to combine both a class selector and an attribute selector with jQuery?

For example, given the following HTML:



        
4条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-12 15:18

    This code works too:

    $("input[reference=12345].myclass").css('border', '#000 solid 1px');
    

提交回复
热议问题