I need to select a dropdown text in which id ends with a string SelectId
if id is fixed as fixedid
it can be reached with
var val = $('#fixedid :selected').text();
But in my case, I know only some final text of this identifier, and this SelectId
I tried the code below but it failed
$('[id$="SelectId"]').text()
How can i achieve this?
source
share