var option = document.getElementById("o");
option.text = "B";
<option id="o">A</option>
I want to change the text of an option
tag with javascript
. For this, I use the text
property like above but the same result is also applied if I use the innerHTML
property. Which one should I choose? Thanks