You should try something like this:
function update(){
i++;
document.getElementById('tekst').innerHTML = i;
setInterval(update(),1000);
}
This means that you have to create a function in which you do the stuff you need to do, and make sure it will call itself with an interval you like. In your body onload call the function for the first time like this:
<body onload="update()">