Katy93,
<!DOCTYPE html>
<html lang="ru">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title></title>
<meta name="description" content="">
<meta name="keywords" content="">
<script type="text/javascript">
document.addEventListener( "DOMContentLoaded" , function() {
const on = (parent, event, selector, fn) => parent.addEventListener(event, ({target}) => {
if(target = target.closest(selector)) fn(target)
})
const fn = ({value}) => {
const html = value == -1 ? '<input type="text" name="other_city">' : '';
const text = value == -1 ? 'Другой город' : 'Город из списка';
document.getElementById("pole").innerHTML = html;
alert(text);
};
on(document.querySelector("#mainForm"), "click", '[name="city"]', fn);
});
</script>
</head>
<body>
<form id="mainForm" name="mainForm">
<input type="text" name="test" value=""><br>
<label><input type="radio" checked="checked" class="city_check" name="city" id="city1" value="1"> Москва</label>
<label><input type="radio" class="city_check" name="city" id="city2" value="2"> Воронеж</label>
<label><input type="radio" class="city_check" name="city" id="city3" value="3"> Новгород</label>
<label><input type="radio" class="city_check" name="city" id="city4" value="4"> Волгоград</label>
<label><input type="radio" class="city_check" name="city" id="city_1" value="-1"> Другой</label>
<div id="pole"></div>
</form>
</body>
</html>