javascript check radio button
//Creates a radio button
var radioInput = document.createElement('input');
radioInput.setAttribute('type', 'radio');
radioInput.setAttribute('name', name);
document.body.appendChild(radioInput); //Adds the button to the DOM
//Select all radio buttons on page
var radioButtons = document.querySelectorAll('input[type="radio"]');