<!DOCTYPE html>
<html>
<body>

<p>Click the radio button to find out which type of form element it is.</p>

<input type="radio" onclick="myFunction()" id="myRadio">

<p id="demo"></p>

<script>
function myFunction() {
    var x = document.getElementById("myRadio").type;
    document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>