want to show number one by one after a second through interval
<p>i want to show numbers one by one after a second, but below coding shows the whole numbers together.</p>

<pre><code>function showVal(){
    for(i=0; i&lt;5; i++)
    {
        var showingVal= document.write("the number is "+i);
        document.write("&lt;br /&gt;");       
    }
}
setInterval('showVal()',1000);
</code></pre>
