get value of selected radio button using javascript
document.getElementById('submit').onclick = function() {
var radios = document.getElementsByName('contact');
for (var radio of radios)
{
if (radio.checked) {
alert(radio.value);
}
}
}