Home > Blockchain >  (PHP) HOW TO STORE THE NAME ATTRIBUTE IN DB INSTEAD OF VALUE
(PHP) HOW TO STORE THE NAME ATTRIBUTE IN DB INSTEAD OF VALUE

Time:04-10

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! HELLO,

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');
  • Related