I'm trying to override the values of some option fields so instead of render numbers, render stars. I'm using vanilla JavaScript and Material-icons (only the icons)
script.js
var select_field = document.getElementsByClassName('select_input')
for (const iterator of select_field) {
var options_list = iterator.options;
options_list[1].innerHTML = "<span class='material-icons'>star</span>"
...
}
This is the code when I inspect the code:
<option value="1"> <span class='material-icons'>star</span> </option>
But the output is:
star
Any idea how to solve this? Thank you in advance