I want to store the text selected from my dropdown instead of value attribute in option tag. I just used API library by the way. Thanks a lot!
CodePudding user response:
To get the of name attribute, consider your using vanilla js.
In your event listener you can do some thins like this
let value = document.querySelector('#id_of_select').getAttribute('name');