JSFiddle - React, Tailwind, and code Playground

by Ditch19

HTML

<select id="s">
   <option value="10">Apple</option>
   <option value="20">Orange</option>
</select>

<input type="text" id="text" />
<input type="text" id="point" />

JavaScript

$("#s").on("change",function(){
    $("#text").val($(this).children().filter("option:selected").text());
    $("#point").val($(this).val());
});