for (var n = 0; n < 5; n++) { document.getElementsByTagName("input")[n].onclick = function() { document.getElementsByTagName("div")[0].style.borderWidth = this.value + "px"; }; }
<input type="radio" name="width" value="20" />20 <input type="radio" name="width" value="30" />30 <input type="radio" name="width" value="40" />40 <input type="radio" name="width" value="50" />50 <input type="radio" name="width" value="60" />60 <div></div>
div { width:75px; height:75px; border-color:#f0eb7a #f0eb7a #12ad2a #f0eb7a; border-style:solid; border-width:20px; -moz-border-radius:50px; }