<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Document</title>
</head>
<body>
<label for="kiev"><input type="radio" name="city" value="1" id="kiev">Київ</label>
<label for="charkiw"><input type="radio" name="city" value="2" id="charkiw">Харків</label>
<label for="odessa"><input type="radio" name="city" value="3" id="odessa">Одесса</label>
</body>
<script>
function v(){
var city = document.getElementsByName('city');
for (i=0; i< city.length; i++) {
if (city[i].checked) {
alert(city[i].id);
break;
}
}
}
document.addEventListener("change", v);
</script>
</html>