var r = document.getElementById("r"); for(var i=0; i<5; i++) { r.innerHTML += _.uniqueId('id') + ' '; }