JSFiddle - React, Tailwind, and code Playground
HTML
<select id="country">
<option>Türkiye</option>
<option>gsdgds</option>
</select>
<select id="city">
<option>ewwet</option>
<option>sdgsdgs</option>
</select>
<select id="town">
<option>dgsdgds</option>
<option>saf\fssf</option>
</select>
JavaScript
$(document).ready(function(){
var city = $('#city');
var town = $('#town');
$('#country').change(function(){
var country = $(this).val();
if(country != 'Türkiye')
{
$('#city').replaceWith('<input class="form-control" type="text" name="city" id="city">');
$('#town').replaceWith('<input class="form-control" type="text" name="town" id="town">');
}
else
{
$('#city').replaceWith(city);
$('#town').replaceWith(town);
}
});
});