<!DOCTYPE HTML>
<html>
<head> </head>
<body>
<form id='fm'>
<label>
<input type="radio" value="young" />младше 18
</label>
<label>
<input type="radio" value="mature" /> старше 50
</label>
<input id='inp' type="text" name="val1" value=""/>
</form>
<script>
!function () {
var form = document.getElementById('fm');
var inpVal = document.getElementById('inp');
form.onclick = OnFormClick;
function OnFormClick (e) {
var target = e.target || event.scrElement;
if(target.type != 'radio') return;
inpVal.value = target.value;
}
}();
</script>
</body>
</html>