Get element by title jQuery

后端 未结 1 1964
感情败类
感情败类 2020-12-03 01:14

I have searched but cannot find the jQuery selector that gets an element by a title. So I would be trying to get a handle on the dropdown with title ==\'cars\'

Eg:

相关标签:
1条回答
  • 2020-12-03 01:50

    Use the attribute-equals selector, like this:

    $("select[title='cars']")
    

    There are other attribute selectors available as well if the need arises :)

    0 讨论(0)
提交回复
热议问题