JSFiddle - React, Tailwind, and code Playground

HTML

<select name = "unit">

        <option value = "120904000" label = "metric">

           Metric (cm)

        </option>

       <option value = "4760000" label = "imperial">

           Imperial (inches)

       </option>

     </select>

 <label for="unit">test</label>

JavaScript

$("select[name = unit]").change(function()
        {
            var selected = $("option:selected", this).text().trim();
          
            if(selected == "Metric (cm)")
            {
                $("label[for = unit]").text("mm");
            }
            else if(selected == "Imperial (inches)")
            {
                $("label[for = unit]").text("inches");  
            }
   });