How to show/hide a field depending on the text in the input text?

Hello!

Want to see the emergence of field area of the city, if the City field, the user entered Moscow. Tried to adapt the example, but I can't. Prompt, please, where is error.

<!--Client (text field)-->
<label class="ipsFieldRow_label" for="content_field_59">
 Your city <span class="ipsFieldRow_required">Necessarily</span>
</label>
<div class="ipsFieldRow_content">
 <input type="text" name="content_field_59" class="inputAdminCity" value id="elInput_content_field_59" onchange="Area(this)">
</div>

<!--District client (text field)-->
<div id="orderArea" style="display: none">
 <label class="ipsFieldRow_label" for="content_field_59">
 The area of the city
</label>
 <div class="ipsFieldRow_content">
 <input type="text" name="content_field_59" value id="elInput_content_field_59">
</div>
</div>

the <script>
 Area function(a) {
 var label = a.placeholder;
 if (label==a) {
document.getElementById("orderArea").style.display='block';
}
 else {
document.getElementById("orderArea").style.display='none';
}
}
</script>
June 3rd 19 at 20:57
0 answer

Find more questions by tags JavaScriptHTML