<button>Click</button>
<input type="radio">
<input type="radio">
<input type="radio">
document.querySelector('button').onclick = () => {
let r = document.querySelectorAll('input[type="radio"]');
for (let i = 0; i < r.length; i++) {
r[i].innerHTML = '<input type="radio" checked>';
}
}
document.querySelector('button').onclick = () => {
let r = document.querySelector('input[type="radio"]');
r.setAttribute('checked', 'true');
}