function lookimg() { var elem = document.getElementsByClassName("bottom")[0]; for (i = 1; i <= 25; i++) { elem.innerHTML += '<input class="pickimg" type="radio" name="img" value="' + i + '">' + '<img src="images/asortiment/'+ i +'.jpg">'; } }