JSFiddle - React, Tailwind, and code Playground
HTML
<select name="unit">
<option value="metric">Metric (cm)</option>
<option value="imperial">Imperial (inches)</option>
</select>
<label for="unit">test</label>
JavaScript
$("select[name = unit]").change(function()
{
var selected = $("option:selected", this).text();
if(selected == "Metric (cm)")
{
$("label[for = unit]").text("mm");
}
else if(selected == "Imperial (inches)")
{
$("label[for = unit]").text("inches");
}
});