JSFiddle - React, Tailwind, and code Playground
HTML
<select></select>
<span></span>
JavaScript
for (i=0; i < 5; i++) {
$('select').append('<option>' + i + '</option>');
}
$('select option').eq(2).attr('selected', 'selected');
function sel(val) {
$('span').empty().append('Выбраное значение: ' + val);
}
$('select').change(function(){
var x = $(this).val();
sel(x);
}).change();