JSFiddle - React, Tailwind, and code Playground
HTML
<style type="text/css">
#in {
display:none;
}
</style>
</head>
<body>
<script type="text/javascript">
function set_action()
{
action_for_script = document.getElementById('get_action'); // переменная с именем селекта
if (action_for_script.value == 1) // если нам передали первый вариант
{
document.getElementById('out').style.display = "block"; // показать блок с ID out
document.getElementById('in').style.display = "none"; // спрятать блок с ID in
}
if (action_for_script.value == 2)// если второй
{
document.getElementById('in').style.display = "block";// показать блок с ID in
document.getElementById('out').style.display = "none";// спрятать блок с ID out
}
}
</script>
<form action="">
<div>
<label for="name">Что вы хотите</label>
<select name ="get_action" id="get_action" onchange="set_action()">
<option value="1" selected="selected">снять</option>
<option value="2">сдать</option>
</select>
</div>
<ol>
<div id="in">
<p>
<label for="postcode">Цена месяца в ру***х</label>
<input id="postcode" />
</p>
</div>
<div id="out">
<p>
<label for="postcode">Цена месяца в ру***х</label>
от <input id="postcode" /> до <input id="postcode" />
</p>
</div>
</ol>
</form>
</body>