Red
Green
Blue

let radios = document.elementsByName(‘colour’;)
for(let i=0; i<radios.length; i++){
radios[i].onclick=function(){let target=document.body;
target.style.backgroundColour=radios[i].value;
}
}


Leave a comment

Design a site like this with WordPress.com
Get started