JSFiddle - React, Tailwind, and code Playground
HTML
<select id="box1" onChange="myNewFunction(this);">
<option value="98">dog</option>
<option value="7122">cat</option>
<option value="142">bird</option>
</select>
<div id="test"></div>
JavaScript
function myNewFunction(element) {
var text = element.options[element.selectedIndex].text;
document.getElementById("test").innerHTML = text;
}