function func(name) { div.innerHTML = "<div>"+name+"</div>"; document.getElementById("blok").appendChild(div); }