var iii = 0; //t is unqiue representer of this timer. //the callback is executed only once after 1000ms var t = setTimeout(function(){ var element = document.getElementById("box"); element.innerHTML = iii++; }, 1000);//1000ms is the execution delay
<div id="box"></div>