I want all of the following boxes to be filled "excellent":
let a = document.querySelectorAll('.select2-choice');
a.forEach((e) => {console.log(e)})
a.forEach((e) => {e.innerHTML = ` <span class="select2-chosen" id="select2-chosen-410">-Excellent-</span><abbr class="select2-search-choice-close"></abbr> <span class="select2-arrow" role="presentation"><b role="presentation"></b></span>
`})
I selected their class using querySelectorAll
and changed the innerHTML
. However, it only changes the pre-written text in the fields but doesn't select the actual options. I just want to fill them with any of their fields, and all at once.